[pgpool-general: 8929] Re: Testing cluster: it doesn't work as expected

Tan Mientras tanimientras at gmail.com
Tue Sep 19 19:43:49 JST 2023


In fact, reading
https://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html
says:

A PostgreSQL node detached by failover or switch over will never return to
the previous state (attached state) automatically *in the default setting*.
Restarting Pgpool-II with -D option or running pcp_attach_node
<https://www.pgpool.net/docs/latest/en/html/pcp-attach-node.html> makes it
to the attached state again. It is recommended to confirm the
replication_state of SHOW POOL NODES
<https://www.pgpool.net/docs/latest/en/html/sql-show-pool-nodes.html> is
"streaming" before doing that. The state indicates that the standby server
is properly connected to the primary server through streaming replication
and both databases are in sync.

>From 4.1 a new parameter auto_failback
<https://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html#GUC-AUTO-FAILBACK>
can be used to do above automatically. See auto_failback
<https://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html#GUC-AUTO-FAILBACK>
for more details.

If I want to recover standby nodes automagically, what shoudl I do?

On Tue, Sep 19, 2023 at 12:23 PM Tan Mientras <tanimientras at gmail.com>
wrote:

> Hi.
>
> Thanks for your response and help. More questions follow.
>
> On Tue, Sep 19, 2023 at 3:57 AM Bo Peng <pengbo at sraoss.co.jp> wrote:
>
>> Hi,
>>
>> > What's the difference between status and pg_status?
>>
>> status: backend status managed by pgpool
>> pg_status: actual backend status (taken from pg_isready. Pgpool-II 4.3 or
>> later)
>>
> Ok
> Said so, having status:down with pg_status:up is not desirable, right? how
> to avoid that?
>
>
>
>> After failover, pgpool detached the node1 and mark it's status as "down":
>>
>> After you restarted node0, you need to run "pcp_attach_node" to attach
>> this node to pgpool.
>> Primary node does not automatically fail back because it's a safe way to
>> manage a cluster.
>>
>> https://www.pgpool.net/docs/latest/en/html/pcp-attach-node.html
>>
> This manual step is required only for primary nodes? What about
> non-primary nodes? how to automatically recovering them?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20230919/990e2375/attachment.htm>


More information about the pgpool-general mailing list