Re: Enable WAL archiving even in standby

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Enable WAL archiving even in standby
Дата
Msg-id CA+U5nMK6bwWMREkW6tFka-B-+ifXBrUryyf9AECR-YdV9zq2Mg@mail.gmail.com
обсуждение исходный текст
Ответ на Enable WAL archiving even in standby  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On 13 August 2014 11:42, Fujii Masao <masao.fujii@gmail.com> wrote:

> I'd propose the attached WIP patch which allows us to enable WAL archiving
> even in standby. The patch adds "always" as the valid value of archive_mode.
> If it's set to "always", the archiver is started when the server is in standby
> mode and all the WAL files that walreceiver wrote to the disk are archived by
> using archive_command. Then, even after the server is promoted to master,
> the archiver keeps archiving WAL files. The patch doesn't change the meanings
> of the setting values "on" and "off" of archive_mode.

Seems OK idea.

Perhaps better to have a new parameter called  archive_role = Origin | Replica | Always should be used so we match
up with how triggers/rules work.
rather than abuse archive_mode

We can pass a attribute called %m (mode?) which tells the
archive_command whether we are Master or Standby when called

Remember to bump the number of background procs by 1 since we
previously assumed archiver would never run in recovery

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Immediate standby promotion
Следующее
От: Andres Freund
Дата:
Сообщение: Re: removing volatile qualifiers from lwlock.c