[pgpool-general: 6540] Re: Not quite getting what "replication delay" is representing ... ?

Tatsuo Ishii ishii at sraoss.co.jp
Thu May 2 14:29:56 JST 2019

For PostgreSQL 9.5, Pgpool-II sends "SELECT SELECT
pg_current_xlog_location()" to the primary node, and "SELECT
pg_last_xlog_replay_location()" to the standby node with user =
sr_check_user and password = sr_check_password against
sr_check_database to calculate the replication lag. What do you ge if
you issue the query by hand?

Best regards,
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php

> Hello.
> I am attempting to configure an existing PostgreSQL 9.5.6 database to
> use pgpool 4.0.4, and I'm hitting something a bit curious.
> The database is running in pretty standard streaming replication mode,
> with the primary on one server and the standby on a second server. As
> far as I can see replication is working well, and doesn't appear to be
> particularly slow. The pgpool configuration file is set with
> master_slave_mode = on and master_slave_sub_mode = "streaming" with
> replication_mode = off, load_balance_mode = off.
> If I test replication on the primary and standby, by for example
> running an update on the primary and looking at the result on the
> standby, I can see that the streaming replication is pretty quick -
> guaranteed subsecond every time I look at it.
> Yet if I do a show pool_nodes on the pgpool server I see extensive
> 'replication delay'. And, even when the database is not doing anything
> that figure remains high.
> If I look in the pgpool log file I see a number of messages like this:
> LOG: Replication of node:1 is behind 1458585952 bytes from the primary
> server (node:0)
> 1,458,585,952 bytes? Nooo, not on the database. If I look in
> pg_stat_replication all four locations (sent, write, flush, replay)
> are the same. As far as the database is concerned there's no
> appreciable delay.
> Am I missing something blindingly obvious here? Have I forgotten to
> set an option somewhere and this delay ... isn't? Is this something I
> can ignore with replication mode = off? If so, is there a way to
> disable the display of these figures in the log?
> Many thanks, and apologies if these are stupid questions :)
> Regards,
> Martin.
> -- 
> Martin Goodson
> "Have you thought up some clever plan, Doctor?"
> "Yes, Jamie, I believe I have."
> "What're you going to do?"
> "Bung a rock at it."
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general

More information about the pgpool-general mailing list