[Pgpool-general] pcp_attach_node problem?
Tatsuo Ishii
ishii at sraoss.co.jp
Wed Jan 7 13:39:08 UTC 2009
Thanks for the report. I think it's a bug with CVS Head. pgpool should
fail over in this case. Fix was committed. Could you please try it
out?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
> Hello,
>
> I have pgpool configured with two backends.
>
> Below is the sequence of events to reproduce the seems-to-be-a-problem:
>
> 1. [Server A] Check the status of the nodes:
> [root ~]# pcp_node_info 10 localhost 9898 postgres postgres 0
> 172.20.79.163 5432 2 1073741823.500000
> [root ~]# pcp_node_info 10 localhost 9898 postgres postgres 1
> 172.20.79.25 5432 2 1073741823.500000
>
> 2. [Server B] stop second backend:
> service postgresql restart
> Stopping postgresql service: [ OK ]
> Starting postgresql service: [ OK ]
>
> 3. [Server A] Check the status of the nodes:
> [root ~]# pcp_node_info 10 localhost 9898 postgres postgres 0
> 172.20.79.163 5432 2 1073741823.500000
> [root ~]# pcp_node_info 10 localhost 9898 postgres postgres 1
> 172.20.79.25 5432 3 1073741823.500000
>
> 4. [Server A] Re-Attach node 1:
> pcp_attach_node 10 localhost 9898 postgres postgres 1
>
> 5. [Server A] Check the status of the nodes:
> [root ~]# pcp_node_info 10 localhost 9898 postgres postgres 0
> 172.20.79.163 5432 2 1073741823.500000
> [root ~]# pcp_node_info 10 localhost 9898 postgres postgres 1
> 172.20.79.25 5432 1 1073741823.500000
>
> 6. Here comes the problem:
>
> 6.a If I had an already opened psql console, like:
> [root ~]# psql -U postgres -p 9999
> Welcome to psql 8.2.1, the PostgreSQL interactive terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help with psql commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> postgres=#
>
> And issue a SQL Select command on a table, like:
> postgres=# select * from pg_stat_activity ;
>
> It sits there forever. Meanwhile, the status of both backends
> are still 2 and 1, respectively.
>
> If, instead, I disconnect the psql console, and connect it
> again, both statuses become 2, and then I can issue the same SQL Select,
> and works just fine.
>
> Any clue?
>
> Thanks,
> Daniel
More information about the Pgpool-general
mailing list