Re: New trigger option of pg_standby

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: New trigger option of pg_standby
Дата
Msg-id 1242247404.3843.503.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответ на Re: New trigger option of pg_standby  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: New trigger option of pg_standby  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: New trigger option of pg_standby  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On Wed, 2009-05-13 at 21:26 +0300, Heikki Linnakangas wrote:

> This whole thing can be considered to be a new feature. 

recovery.conf will contain a new optional parameter:

recovery_end_command (string)

This parameter specifies a shell command that will be executed once only
at the end of recovery. This parameter is optional. The purpose of the
recovery_end_command is to provide a mechanism for cleanup following
replication or recovery. Any %r is replaced by the name of the file
containing the last valid restart point. That is the earliest file that
must be kept to allow a restore to be restartable, so this information
can be used to truncate the archive to just the minimum required to
support restart of the current restore. %r would only be used in a
warm-standby configuration (see Section 24.4). Write %% to embed an
actual % character in the command.


recovery_end_command is performed *after* the UpdateControlFile() once
the we are DB_IN_PRODUCTION.

This behaviour ensures that a crash prior to the final checkpoint will
continue to see the trigger file. Once we are safe, we can remove the
trigger file safely. We also can now ignore any complexity surrounding
whether WAL files are full or not, and whether WAL files were restored
from the archive or from the local directory.

Comments? 

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: New trigger option of pg_standby
Следующее
От: Tom Lane
Дата:
Сообщение: Re: New trigger option of pg_standby