clarification about async streaming replication and replication slots

From: Tom DalPozzo <t(dot)dalpozzo(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: clarification about async streaming replication and replication slots
Date: 2017-04-28 10:32:28
Message-ID: CAK77FCRMs+EHFe4-Qi_tQ_xm_yvmaQ0dSx=sbO7y_dqFvo9zpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Mark Watson 2017-04-28 13:14:28 Re: Postgres 9.6.2 and pg_log - solved
Previous Message Vik Fearing 2017-04-28 08:16:33 Re: LIMIT clause slowing down query in some cases, accelerating in others