pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postgresql replication replay lag
2+ messages / 2 participants
[nested] [flat]

* postgresql replication replay lag
@ 2021-12-27 16:22  Kenny Bachman <kenny.bachman17@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Kenny Bachman @ 2021-12-27 16:22 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Hello PG Team,

I have a 3-nodes Patroni cluster with PG 12.9. There is a replay lag on the
third node. I don't understand why there is lag. The replication view
output is below :

Extra info: There is no long-running query on the third node.

Where can I check to detect what's causing this?

Thank you,
Best,
Kenny

-[ RECORD 1 ]----+------------------------------
pid              | 1442401
usesysid         | 15302
usename          | replicator
application_name | henb
client_addr      | 10.109.15.94
client_hostname  | henb.acc
client_port      | 43286
backend_start    | 2021-11-13 15:16:43.462115
backend_xmin     |
state            | streaming
sent_lsn         | 8E66/4FC9F618
write_lsn        | 8E66/4FC9F618
flush_lsn        | 8E66/4FC9F618
replay_lsn       | 8E66/4F58F000
write_lag        | 00:00:00.000653
flush_lag        | 00:00:00.00126
replay_lag       | 00:00:05.463059
sync_priority    | 0
sync_state       | async
reply_time       | 2021-12-27 17:02:56.750262+03
-[ RECORD 2 ]----+------------------------------
pid              | 1390172
usesysid         | 15302
usename          | replicator
application_name | henc
client_addr      | 10.109.15.95
client_hostname  | henc.acc
client_port      | 47982
backend_start    | 2021-11-13 15:19:42.065277
backend_xmin     |
state            | streaming
sent_lsn         | 8E66/4FC9F618
write_lsn        | 8E66/4FC9F618
flush_lsn        | 8E66/4FC9F618
replay_lsn       | 8E63/6E340B20
write_lag        | 00:00:00.010311
flush_lag        | 00:00:00.01101
*replay_lag       | 02:00:15.147839*
sync_priority    | 0
sync_state       | async
reply_time       | 2021-12-27 17:02:56.7555

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: postgresql replication replay lag
@ 2021-12-29 04:53  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Kenny Bachman <kenny.bachman17@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Laurenz Albe @ 2021-12-29 04:53 UTC (permalink / raw)
  To: Kenny Bachman <kenny.bachman17@gmail.com>; pgsql-admin@lists.postgresql.org

On Mon, 2021-12-27 at 19:22 +0300, Kenny Bachman wrote:
> I have a 3-nodes Patroni cluster with PG 12.9. There is a replay lag on the third node.
> I don't understand why there is lag. The replication view output is below :
> 
> Extra info: There is no long-running query on the third node.
> 
> Where can I check to detect what's causing this?

On the lagging node, examine

SELECT * FROM pg_stat_activity;

That should show you what causes the lag.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-12-29 04:53 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27 16:22 postgresql replication replay lag Kenny Bachman <kenny.bachman17@gmail.com>
2021-12-29 04:53 ` Laurenz Albe <laurenz.albe@cybertec.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox