[pgpool-hackers: 1421] Re: Item #11, torward pgpool-II 3.6

Yugo Nagata nagata at sraoss.co.jp
Mon Feb 22 16:29:05 JST 2016


On Mon, 22 Feb 2016 16:02:03 +0900 (JST)
Tatsuo Ishii <ishii at postgresql.org> wrote:

> > Do you mean if we can distiguish TCP connection failure from othres, we
> > can eliminate unnecessary proces exiting on failover? 
> 
> No. I am talking about a problem caused by a cable is pulled out. See
> the attached mails in the upthread email.

I'm sorry. I had read the attached mails but I wrote it incorrectly.
What I want to ask is; when a failover occurs, if we know this isn't caused
by a cable pllued out, can we handle this without killing the processes?

> 
> > For example, don't we need to exit processes in the following cases?
> > 
> > a. when using pcp_degenerate_node commend
> 
> What is pcp_degenerate_node commend?

It's a mistake. I meant pcp_detach_node. This command is used to
degenerate the backend manually, and in this case, the failover
isn't caused by a cable plugged out.

> 
> > b. when the backend send ADMIN_SHUTDOWN_ERROR_CODE ("57P01") or
> >    CRASH_SHUTDOWN_ERROR_CODE "57P02"
> 
> Not related to the topic I'm arguing.

When these error/notice messages are sent, a failover occurs by calling
notice_backend_error(). However, this is caused administrative shutdown
of backend and not a cable un-plugged. I think we don't need kill
processes in this case.


(pool_process_query.c)
4521                 /*
4522                  * admin shutdown postmaster or postmaster goes down
4523                  */
4524                 r = detect_postmaster_down_error(CONNECTION(backend, i), MAJOR(backend));
4525                 if (r == SPECIFIED_ERROR)
4526                 {
4527                     ereport(LOG,
4528                         (errmsg("reading and processing packets"),
4529                              errdetail("postmaster on DB node %d was shutdown by administrative command", i)));
4530                     /* detach backend node. */
4531                     was_error = 1;
4532                     if (!VALID_BACKEND(i))
4533                         break;
4534                     notice_backend_error(i);
4535                     sleep(5);
4536                     break;
4537                 }


> 
> > c. when we can confirm that there are no problem on TCP connection
> >    from ping result
> > 
> > Of course, this is the exception when the backend is used by the current session.
> 
> Yes.
> 
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp


-- 
Yugo Nagata <nagata at sraoss.co.jp>


More information about the pgpool-hackers mailing list