Re: Replication lag from transaction logs

Поиск
Список
Период
Сортировка
От Scott Ribe
Тема Re: Replication lag from transaction logs
Дата
Msg-id 37FEEBC3-CA72-46B4-ABA3-ADDDD8FF4316@elevated-dev.com
обсуждение исходный текст
Ответ на Re: Replication lag from transaction logs  (Debraj Manna <subharaj.manna@gmail.com>)
Ответы Re: Replication lag from transaction logs  (Keith <keith@keithf4.com>)
Список pgsql-admin
> On Jun 18, 2018, at 9:56 AM, Debraj Manna <subharaj.manna@gmail.com> wrote:
>
> Thanks Keith this is useful.
>
> One more query if I need to know that if a have fallen too far behind and the WAL is not available. I guess I can do
this.Let me know if my understanding is correct. 
>     • Run pg_controldata <DATA_DIR> on the slave node which has been down for long.
>     • It will output the details about the WAL along with the WAL file name from where it will start the replication.
(Fieldto look for in the output– 'Latest checkpoint's REDO WAL file') 
>     • Then check if the file mentioned in ` 'Latest checkpoint's REDO WAL file' is present in master `pg_wal`
directory.If not then slave have fallen too far behind and will not be able to recover from WAL.   

You could also try bringing the slave back up, and monitoring the log for the error about needed WAL file not being
available--thisavoids the race condition between checking that all WAL is available and restarting the slave. 

--
Scott Ribe
scott_ribe@elevated-dev.com
https://www.linkedin.com/in/scottribe/




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

Предыдущее
От: Debraj Manna
Дата:
Сообщение: Re: Replication lag from transaction logs
Следующее
От: Bas Cancrinus
Дата:
Сообщение: pgAdmin4 Docker deployment issue