From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Enable WAL archiving even in standby |
Date: | 2014-09-17 11:38:15 |
Message-ID: | CA+U5nMK6bwWMREkW6tFka-B-+ifXBrUryyf9AECR-YdV9zq2Mg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 13 August 2014 11:42, Fujii Masao <masao(dot)fujii(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-09-17 11:45:58 | Re: removing volatile qualifiers from lwlock.c |
Previous Message | Simon Riggs | 2014-09-17 11:23:41 | Re: Immediate standby promotion |