[pgpool-general: 3057] Re: PGPool connection dropped when using pg_detach

James Sewell james.sewell at lisasoft.com
Fri Jul 25 12:43:47 JST 2014


I had a look in the logs and this shows directly after the pcp_detach.

In this environment 10.51.9.227 is the standby database, it is node_id 0.

2014-07-25 13:39:40 LOG:   pid 11286: wd_start_interlock: start interlocking
2014-07-25 13:39:40 LOG:   pid 11286: starting degeneration. shutdown host
10.51.9.227(5432)
2014-07-25 13:39:40 LOG:   pid 11286: Restart all children
2014-07-25 13:39:40 DEBUG: pid 11303: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11304: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11305: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11306: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11307: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11308: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11309: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11310: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11311: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11312: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11313: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11314: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11315: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11316: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11317: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11318: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11319: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11320: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11321: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11322: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11323: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11324: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11325: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11326: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11327: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11328: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11329: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11330: child received shutdown request
signal 3
2014-07-25 13:39:40 DEBUG: pid 11331: child received shutdown request
signal 3
2014-07-25 13:39:41 DEBUG: pid 11332: child received shutdown request
signal 3
2014-07-25 13:39:41 LOG:   pid 11286: find_primary_node_repeatedly: waiting
for finding a primary node
2014-07-25 13:39:41 LOG:   pid 11286: find_primary_node: primary node id is
1
2014-07-25 13:39:41 LOG:   pid 11286: wd_end_interlock: end interlocking
2014-07-25 13:39:41 LOG:   pid 11286: failover: set new primary node: 1
2014-07-25 13:39:41 LOG:   pid 11286: failover: set new master node: 1
2014-07-25 13:39:42 LOG:   pid 11336: worker process received restart
request
2014-07-25 13:39:42 LOG:   pid 11286: failover done. shutdown host
10.51.9.227(5432)

Cheers,



James Sewell,
PostgreSQL Team Lead / Solutions Architect
______________________________________


 Level 2, 50 Queen St, Melbourne VIC 3000

*P *(+61) 3 8370 8000  *W* www.lisasoft.com  *F *(+61) 3 8370 8099



On Fri, Jul 25, 2014 at 10:43 AM, James Sewell <james.sewell at lisasoft.com>
wrote:

> Hey all,
>
> This is a seemingly a pretty bad problem which I uncovered as part of my
> last post, so the start of the message will be similar.
>
> I have two pgpool nodes which I am using a TCP load balancer to spread
> between. I am using watchdog to synchronise PostgreSQL node information
> between the two and an external HA solution (with ALLOW_TO_FAILOVER).
>
> If I start both my pgpool nodes up I get the following initial state:
>
> postgres=# show pool_nodes;
>  node_id |  hostname   | port | status | lb_weight |  role
> ---------+-------------+------+--------+-----------+---------
>  0       | 10.10.10.1   | 5432 | 2      | 0.500000  | standby
>  1       | 10.10.10.2   | 5432 | 2      | 0.500000  | primary
> (2 rows)
>
> Now I open a PSQL connection and do the following:
>
> postgres=# SELECT inet_server_addr();
>  inet_server_addr
> ------------------
>  10.10.10.2
> (1 row)
>
> This shows I am connected to the primary.
>
> I can run this multiple times and I will always be connected to the
> primary, as long as I don't close the psql session.
>
> Then from another window I run the following command:
>
>  pcp_detach_node 1 load_balancer 9898 postgres postgres 0
>
> And in the same PSQL session run the command again:
>
> postgres=# SELECT inet_server_addr();
> SSL SYSCALL error: EOF detected
> The connection to the server was lost. Attempting reset: Succeeded.
>
> This is strange. Why has my master connection been severed?
>
> James Sewell,
>  PostgreSQL Team Lead / Solutions Architect
> ______________________________________
>
>
>  Level 2, 50 Queen St, Melbourne VIC 3000
>
> *P *(+61) 3 8370 8000  *W* www.lisasoft.com  *F *(+61) 3 8370 8099
>
>

-- 


------------------------------
The contents of this email are confidential and may be subject to legal or 
professional privilege and copyright. No representation is made that this 
email is free of viruses or other defects. If you have received this 
communication in error, you may not copy or distribute any part of it or 
otherwise disclose its contents to anyone. Please advise the sender of your 
incorrect receipt of this correspondence.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20140725/29af9ea6/attachment-0001.html>


More information about the pgpool-general mailing list