[pgpool-general: 7456] Expected behaviour after pcp_detach_node ?
Anssi Kanninen
anssi at iki.fi
Thu Mar 25 20:07:04 JST 2021
Hi!
What is the expected behaviour when detaching a node?
I have a three-node test cluster with pgpool-II 4.1.3
and PostgreSQL 12 like below.
id | hostname | status | role | repl_delay | repl_state | repl_sync_st | last_status_change
0 | 10.0.0.1 | up | primary | 0 | | | 2021-03-25 12:18:27
1 | 10.0.0.2 | up | standby | 0 | streaming | async | 2021-03-25 12:18:56
2 | 10.0.0.3 | up | standby | 0 | streaming | async | 2021-03-25 12:18:56
*** Then I run "pcp_detach_node 0". The second node was promoted as expected:
id | hostname | status | role | repl_delay | repl_state | repl_sync_st | last_status_change
0 | 10.0.0.1 | down | standby | 0 | | | 2021-03-25 12:25:27
1 | 10.0.0.2 | up | primary | 0 | | | 2021-03-25 12:25:27
2 | 10.0.0.3 | down | standby | 0 | | | 2021-03-25 12:25:27
*** But then, the first one is back as primary again?
id | hostname | status | role | repl_delay | repl_state | repl_sync_st | last_status_change
0 | 10.0.0.1 | up | primary | 0 | | | 2021-03-25 12:25:36
1 | 10.0.0.2 | up | standby | 0 | | | 2021-03-25 12:25:36
2 | 10.0.0.3 | down | standby | 0 | | | 2021-03-25 12:25:27
*** After that, returning as standby, the second node is primary:
id | hostname | status | role | repl_delay | repl_state | repl_sync_st | last_status_change
0 | 10.0.0.1 | up | standby | 0 | | | 2021-03-25 12:25:45
1 | 10.0.0.2 | up | primary | 0 | | | 2021-03-25 12:25:45
2 | 10.0.0.3 | up | standby | 0 | | | 2021-03-25 12:25:45
*** After all, this is the final state.
id | hostname | status | role | repl_delay | repl_state | repl_sync_st | last_status_change
0 | 10.0.0.1 | up | standby | 33463880 | | | 2021-03-25 12:25:45
1 | 10.0.0.2 | up | primary | 0 | | | 2021-03-25 12:25:45
2 | 10.0.0.3 | up | standby | 0 | streaming | async | 2021-03-25 12:25:45
So finally, the second node was promoted as expected.
But why is the first node "up" again even if it's not replicating?
See pgpool.conf attached.
Best regards,
Anssi Kanninen
--
anssi at iki.fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool.conf
Type: application/octet-stream
Size: 44465 bytes
Desc:
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20210325/ac32b97e/attachment.obj>
More information about the pgpool-general
mailing list