[GENERAL] clarification about async streaming replication and replication slots - Mailing list pgsql-general

From Tom DalPozzo
Subject [GENERAL] clarification about async streaming replication and replication slots
Date
Msg-id CAK77FCRMs+EHFe4-Qi_tQ_xm_yvmaQ0dSx=sbO7y_dqFvo9zpA@mail.gmail.com
Whole thread Raw
List pgsql-general
Hi,
I need a clarification about async streaming replication and replication slots.
I have a master and a standby both with server process running but with network disconnected between them.

In my primary, I see:
  pg_current_xlog_location = B/48DFF790
  and, through pg_replication_slots, that standby restart_lsn =  B/48DFF6E8.

In my standby, I see:
 pg_last_xlog_receive_location = B/48000000
 pg_last_xlog_replay_location =  B/48DFF6E8

My questions are:
1) why is  pg_last_xlog_receive_location< pg_last_xlog_replay_location ? The standby should receive some parts from master's WAL, write them down to its WAL  and then replay them, right?
2) Can I compare  master's   pg_current_xlog_location against   pg_replication_slots.restart_lsn
in order to check if the standby is synchronized?
Regards
Pupillo





pgsql-general by date:

Previous
From: Vik Fearing
Date:
Subject: Re: [GENERAL] LIMIT clause slowing down query in some cases,accelerating in others
Next
From: Mark Watson
Date:
Subject: Re: [GENERAL] Postgres 9.6.2 and pg_log - solved