From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Logging WAL when updating hintbit |
Date: | 2013-12-03 02:57:09 |
Message-ID: | CAB7nPqT6Ggg=uVrXfK7ken9+3VJa_s5WAbzfU4ocvAc3S1wemQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 3, 2013 at 1:08 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, Dec 2, 2013 at 12:54 AM, Michael Paquier
>> Considering that, it would make more sense to have this option
>> settable with initdb only and not changeable after initialization, in
>> the same fashion as checksums. Having a GUC that can be used to check
>> if this option is set or not using a SQL command could be an
>> additional patch on top of the core feature.
>
> Forcing it to be done only an initdb-time is excessive. I think you
> can just make it PGC_POSTMASTER and have it participate in the
> XLOG_PARAMETER_CHANGE mechanism. pg_rewind can check that it's set in
> the control file before agreeing to rewind.
Yes, this is only a matter of adding a couple of lines of code.
> As long as it was set at
> the time the master last entered read-write mode (which is what the
> XLOG_PARAMETER_CHANGE stuff does) you should be fine, unless of course
> I haven't had enough caffeine this morning, which is certainly
> possible.
Indeed, I forgot this code path. Completing XLogReportParameters for
saving the state and xlog_redo for replay would be enough.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2013-12-03 03:02:36 | Re: Logging WAL when updating hintbit |
Previous Message | Peter Geoghegan | 2013-12-03 02:46:43 | Re: [PATCH] Report exit code from external recovery commands properly |