Re: [ADMIN] Standby WAL Cleanup?

Поиск
Список
Период
Сортировка
От Don Seiler
Тема Re: [ADMIN] Standby WAL Cleanup?
Дата
Msg-id CAHJZqBDZRTVtj63W2aPTurofn-CHQsNLwupe+i6+GPBAX5zUNw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [ADMIN] Standby WAL Cleanup?  (Guillaume Lelarge <guillaume@lelarge.info>)
Ответы Re: [ADMIN] Standby WAL Cleanup?  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-admin
On Mon, Aug 14, 2017 at 3:58 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:

The server removes the WAL files it doesn't need anymore, weither it is a primary (after a checkpoint) or a secondary node (after a restartpoint). That's just part of the usual process.

I know the documentation says this about a standalone database regarding the "archive_command" parameter.

"It is important that the archive command return zero exit status if and only if it succeeds. Upon getting a zero result, PostgreSQL will assume that the file has been successfully archived, and will remove or recycle it."

 However on a standby, my understanding is that the archive_command parameter is not used. I know for sure that it would fail on the standby that I'm looking at.

Although I did search for restartpoints and see this now:

In archive recovery or standby mode, the server periodically performs restartpoints which are similar to checkpoints in normal operation: the server forces all its state to disk, updates the pg_control file to indicate that the already-processed WAL data need not be scanned again, and then recycles any old log segment files in pg_xlog directory.

So I guess that's all the info I need then. Is there any to control that behavior if (for reasons I can't think of right now other than cascading standby) I wanted to delay that file recycling? Just curious.

Don.
--
Don Seiler
www.seiler.us

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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: [ADMIN] Standby WAL Cleanup?
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: [ADMIN] Standby WAL Cleanup?