On Tue, Dec 3, 2013 at 1:08 AM, Robert Haas <robertmh...@gmail.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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers