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

Bo Peng pengbo at sraoss.co.jp
Fri Sep 22 17:42:39 JST 2023


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?

"pg_status" doesn't affect the operation of Pgpool-II.
It is just information for users.
 
> > 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?

You can also use pcp_attach_node to attach a standby node.

Alternatively, you can set "auto_failback = off" to automatically attach
a health standby node that went down.

Also, I found that in your configuration you enabled failover without setting "failover_command".
Are you using other tools for failover?

-------------------------------------
backend_flag0 = 'ALWAYS_PRIMARY'
backend_flag1 = 'ALLOW_TO_FAILOVER'
backend_flag2 = 'ALLOW_TO_FAILOVER'
failover_command = 'echo ">>> Failover - that will initialize new primary node search!"' 
-------------------------------------

-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS LLC
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/


More information about the pgpool-general mailing list