Re: Monitoring Replication on Master/Slave Postgres(9.1)

Поиск
Список
Период
Сортировка
От Stuart Bishop
Тема Re: Monitoring Replication on Master/Slave Postgres(9.1)
Дата
Msg-id CADmi=6NGBEKVQTcDdnPX3DfPf3Y8magKLVi=riZB3JaJRb4vsQ@mail.gmail.com
обсуждение исходный текст
Ответ на Monitoring Replication on Master/Slave Postgres(9.1)  (Shams Khan <shams.khan22@gmail.com>)
Список pgsql-admin
On Mon, Nov 26, 2012 at 5:05 PM, Shams Khan <shams.khan22@gmail.com> wrote:

> I want to know the ways to monitor the replication, whether the master and
> slave server are sync.

On the slave, run "SELECT now() - pg_last_xact_replay_timestamp() AS
time_lag;". That tells you how far behind in time the slave is.

> My question is how do we read these numbers(17A/342A6F78 and 17A/34366C30) I
> never got the same results on both servers. Is that mean slave is not synced
> with master?

With asynchronous replication, the slave will always lag behind the
master. The query I posted above will tell you by how much.

--
Stuart Bishop <stuart@stuartbishop.net>
http://www.stuartbishop.net/


В списке pgsql-admin по дате отправления:

Предыдущее
От: Shams Khan
Дата:
Сообщение: Re: Fwd: Monitoring Replication on Master/Slave Postgres(9.1)
Следующее
От: Shams Khan
Дата:
Сообщение: Fwd: Monitoring Replication on Master/Slave Postgres(9.1)