[pgpool-general: 4168] Re: pcp commands

Shay Cohavi cohavisi at gmail.com
Wed Nov 4 16:08:03 JST 2015


I have simulated the exact scenario with pcp commands (not pgpool_adm sql
commands) and everything works great!!
but I need to use the pgpool_adm command (via sql)......
any ideas how can I track the disconnection errors?

Thanks,
cohavisi

On Wed, Nov 4, 2015 at 1:44 AM, Tatsuo Ishii <ishii at postgresql.org> wrote:

> It's an expected behavior. pgpool-II disconnects sessions to client
> when failover occurs.
>
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
>
> > Hi,
> > I have another issue regarding detach/attach node via pgpool_adm
> functions:
> > looks like everytime I detach the primary node (in order to trigger a
> > failover), the connection to the pgpool get lost:
> >
> >
> > [root at localhost ~]# psql -U postgres template1 -h 192.168.15.59 -p 9999
> > Password for user postgres:
> > psql (9.3.1)
> > Type "help" for help.
> >
> > template1=# show pool_nodes;
> >  node_id |   hostname    | port | status | lb_weight |  role
> > ---------+---------------+------+--------+-----------+---------
> >  0       | 192.168.15.55 | 5432 | 2      | 0.500000  | primary
> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | standby
> > (2 rows)
> >
> >
> > template1=#
> > template1=#
> > template1=#
> > template1=# select
> > pcp_detach_node(0,False,'192.168.15.59',500,9898,'usr','pass');
> >  pcp_detach_node
> > -----------------
> >  t
> > (1 row)
> >
> > template1=# show pool_nodes;
> > *The connection to the server was lost. Attempting reset:*
> > *Succeeded.*
> > template1=# show pool_nodes;
> >  node_id |   hostname    | port | status | lb_weight |  role
> > ---------+---------------+------+--------+-----------+---------
> >  0       | 192.168.15.55 | 5432 | 3      | 0.500000  | standby
> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary
> > (2 rows)
> >
> >
> > template1=# select
> pcp_attach_node(0,'192.168.15.59',500,9898,'usr','pass');
> > *The connection to the server was lost. Attempting reset: Succeeded.*
> > template1=# select
> pcp_attach_node(0,'192.168.15.59',500,9898,'usr','pass');
> >  pcp_attach_node
> > -----------------
> >  t
> > (1 row)
> >
> >
> >
> > template1=# show pool_nodes;
> >  node_id |   hostname    | port | status | lb_weight |  role
> > ---------+---------------+------+--------+-----------+---------
> >  0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby
> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary
> > (2 rows)
> >
> > template1=# show pool_nodes;
> >  node_id |   hostname    | port | status | lb_weight |  role
> > ---------+---------------+------+--------+-----------+---------
> >  0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby
> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary
> > (2 rows)
> >
> > template1=# show pool_nodes;
> >  node_id |   hostname    | port | status | lb_weight |  role
> > ---------+---------------+------+--------+-----------+---------
> >  0       | 192.168.15.55 | 5432 | 1      | 0.500000  | standby
> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary
> >
> >
> > template1=# show pool_nodes;
> >  node_id |   hostname    | port | status | lb_weight |  role
> > ---------+---------------+------+--------+-----------+---------
> >  0       | 192.168.15.55 | 5432 | 2      | 0.500000  | standby
> >  1       | 192.168.15.56 | 5432 | 2      | 0.500000  | primary
> > (2 rows)
> >
> > template1=#
> >
> >
> > Please advise.....
> >
> > cohavisi
> >
> >
> > On Thu, Oct 29, 2015 at 1:50 PM, Shay Cohavi <cohavisi at gmail.com> wrote:
> >
> >> Thanks!!!!
> >> I'm using postgres 9.3.1 !
> >>
> >>
> >> On Thu, Oct 29, 2015 at 8:58 AM, Tatsuo Ishii <ishii at postgresql.org>
> >> wrote:
> >>
> >>> >> *pcp_node_info*
> >>> >>
> >>> >> template1=# select
> >>> pcp_node_info(0,'192.168.15.59',500,9898,'user','pass');
> >>> >> The connection to the server was lost. Attempting reset: Failed.
> >>> >> !>
> >>> >
> >>> > Will look into this.
> >>>
> >>> Assuming you are using PostgreSQL 9.4, I found some compiler warnings
> >>> with the source file. Please try attached patches.
> >>>
> >>> Best regards,
> >>> --
> >>> Tatsuo Ishii
> >>> SRA OSS, Inc. Japan
> >>> English: http://www.sraoss.co.jp/index_en.php
> >>> Japanese:http://www.sraoss.co.jp
> >>>
> >>
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20151104/df018c43/attachment.html>


More information about the pgpool-general mailing list