Re: unite recovery.conf and postgresql.conf

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: unite recovery.conf and postgresql.conf
Дата
Msg-id 4EB82E1A.2030400@agliodbs.com
обсуждение исходный текст
Ответ на Re: unite recovery.conf and postgresql.conf  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: unite recovery.conf and postgresql.conf  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: unite recovery.conf and postgresql.conf  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
> Agreed.  This thread has already expended too much of our valuable time,
> in my opinion.

As I said elsewhere, I think that a modified version of Simon's proposal
gets us all what we want except code cleanliness.  I'd like to hear from
Tom on that issue.

The proposal is:

1. No changes are expected to PITR mode, unless required by the other
changes below.

2. standby_mode becomes an ENUM: "off,standby,pitr".  It can be reset on
server reload or through "pg_ctl promote"

3. we add a "recovery_file" filepath parameter to postgresql.conf.  This
points to the location of recovery.conf, if any, but does not error
fatally if the file doesn't exist, allowing recovery.conf/.done if we
want to support it.3.a. we continue to support recovery.conf/.done trigger file            behavior if recovery_file is
set. In this case,     the recovery.conf file would contain the standby_mode GUC.       3.b. should pitr mode require
recovery_file? Doesn't seem            like it.       3.c. we begin arguments on whether or not recovery_file
should be set by default
 

4. Haas implements  SET PERSISTENT for postgresql.conf

5. pg_ctl promote uses SET PERSISTENT to change standby_mode so that
former standbys can be permanently promoted.

6. (optional) we add include_if_exists specifier for postgresql.conf,
allowing scripters to handle having a separate recovery.conf file in
other ways.

7. (optional) we add a "pg_ctl standby" command which starts up
postgres and sets standby_mode to "standby".  I'm not sure I see the
value in this though.

The above allows DBAs to operate in "backwards compatibility mode"
without forcing authors of new tools and scripts to abide by it.

Question: if both standby_mode and recovery_file are set, what should
happen if the recovery_file is not present?  For backwards
compatibility, we would use SET PERSISTENT to set standby_mode after the
server comes up.  Arguments?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: synchronous commit vs. hint bits
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: GiST for range types (was Re: Range Types - typo + NULL string constructor)