[pgpool-hackers: 3270] Re: Replication lag calculation by pgpool
Bo Peng
pengbo at sraoss.co.jp
Mon Mar 18 09:57:59 JST 2019
Hi,
On Sun, 17 Mar 2019 22:13:22 +0530
Abhijit Gharami <abhijitgharami at gmail.com> wrote:
> Hi,
>
> In our PostgreSQL setup, we have 2 PostgreSQL VMs(primary, standby) and 3
> Pgpool VMs. During failover we check the replication lag. If the
> replication lag is zero
> then we proceed for failover. To check the replication lag we rely on
> pgpool, command we use to check the lag is "show pool_nodes".
> We extract the last column value of standby node entry.
>
> We have couple question regarding the replication lag calculation. Please
> help us here.
> 1 - Can we rely on this replication lag value incase postgresql primary is
> down?
>
> 2 - How Pgpool calculate the replication lag if primary VM is down?
No. In this case, you can not execute "show pool_nodes" to get replication lag.
See document:
http://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html
| Note: You can run psql (or whatever command) against backend to retrieve some information in the script,
| but you cannot run psql against Pgpool-II itself, since the script is called from Pgpool-II and it needs
| to run while Pgpool-II is working on failover.
> Regards,
> Abhijit
--
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan
More information about the pgpool-hackers
mailing list