booleans in recovery.conf
booleans in recovery.conf
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Is there a reason that recovery.conf uses true/false, while postgresql.conf uses on/off? #recovery_target_inclusive = 'true' # 'true' or 'false' or are these settings more boolean for some reason? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do
Re: booleans in recovery.conf
От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Wed, Mar 24, 2010 at 8:43 AM, Bruce Momjian wrote: > Is there a reason that recovery.conf uses true/false, while > postgresql.conf uses on/off? IIRC, because, in the old version, recovery.conf allowed only true/false as a boolean value. Of course, we can change those now. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
Re: booleans in recovery.conf
От:
Simon Riggs <simon@2ndQuadrant.com>
Дата:
On Tue, 2010-03-23 at 19:43 -0400, Bruce Momjian wrote: > Is there a reason that recovery.conf uses true/false, while > postgresql.conf uses on/off? > > #recovery_target_inclusive = 'true' # 'true' or 'false' > > or are these settings more boolean for some reason? The code accepts any of on|off|true|false and uses the same code as the postgresql.conf for parsing that. I've changed the standby_mode to on|off as per the docs. I left the above parameter because true|false reads better. -- Simon Riggs www.2ndQuadrant.com
Re: booleans in recovery.conf
От:
Bruce Momjian <bruce@momjian.us>
Дата:
Simon Riggs wrote: > On Tue, 2010-03-23 at 19:43 -0400, Bruce Momjian wrote: > > Is there a reason that recovery.conf uses true/false, while > > postgresql.conf uses on/off? > > > > #recovery_target_inclusive = 'true' # 'true' or 'false' > > > > or are these settings more boolean for some reason? > > The code accepts any of on|off|true|false and uses the same code as the > postgresql.conf for parsing that. > > I've changed the standby_mode to on|off as per the docs. I left the > above parameter because true|false reads better. Agreed. I also applied the attached change so defaults are listed and example values only appear as comments in the file. This makes the file match postgresql.conf in style. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com Index: src/backend/access/transam/recovery.conf.sample =================================================================== RCS file: /cvsroot/pgsql/src/backend/access/transam/recovery.conf.sample,v retrieving revision 1.7 diff -c -c -r1.7 recovery.conf.sample *** src/backend/access/transam/recovery.conf.sample 29 Mar 2010 18:50:36 -0000 1.7 --- src/backend/access/transam/recovery.conf.sample 31 Mar 2010 14:16:12 -0000 *************** *** 20,27 **** # Comments are introduced with '#'. # # The complete list of option names and allowed values can be found ! # in the PostgreSQL documentation. The commented-out settings shown below ! # are example values. # #--------------------------------------------------------------------------- # ARCHIVE RECOVERY PARAMETERS --- 20,26 ---- # Comments are introduced with '#'. # # The complete list of option names and allowed values can be found ! # in the PostgreSQL documentation. # #--------------------------------------------------------------------------- # ARCHIVE RECOVERY PARAMETERS *************** *** 44,50 **** # NOTE that the basename of %p will be different from %f; do not # expect them to be interchangeable. # ! #restore_command = 'cp /mnt/server/archivedir/%f %p' # # # restartpoint_command --- 43,49 ---- # NOTE that the basename of %p will be different from %f; do not # expect them to be interchangeable. # ! #restore_command = '' # e.g. 'cp /mnt/server/archivedir/%f %p' # # # restartpoint_command *************** *** 74,91 **** # transaction(s) with the recovery target value (ie, stop either # just after or just before the given target, respectively). # ! #recovery_target_time = '2004-07-14 22:39:00 EST' # ! #recovery_target_xid = '1100842' # ! #recovery_target_inclusive = 'true' # 'true' or 'false' # # # If you want to recover into a timeline other than the "main line" shown in # pg_control, specify the timeline number here, or write 'latest' to get # the latest branch for which there's a history file. # ! #recovery_target_timeline = '33' # number or 'latest' # #--------------------------------------------------------------------------- # LOG-STREAMING REPLICATION PARAMETERS --- 73,90 ---- # transaction(s) with the recovery target value (ie, stop either # just after or just before the given target, respectively). # ! #recovery_target_time = '' # e.g. '2004-07-14 22:39:00 EST' # ! #recovery_target_xid = '' # ! #recovery_target_inclusive = 'true' # # # If you want to recover into a timeline other than the "main line" shown in # pg_control, specify the timeline number here, or write 'latest' to get # the latest branch for which there's a history file. # ! #recovery_target_timeline = 'latest' # #--------------------------------------------------------------------------- # LOG-STREAMING REPLICATION PARAMETERS *************** *** 96,104 **** # connection settings primary_conninfo, and receives XLOG records # continuously. # ! #standby_mode = 'off' # 'on' or 'off' # ! #primary_conninfo = 'host=localhost port=5432' # # # By default, a standby server keeps streaming XLOG records from the --- 95,103 ---- # connection settings primary_conninfo, and receives XLOG records # continuously. # ! #standby_mode = 'off' # ! #primary_conninfo = '' # e.g. 'host=localhost port=5432' # # # By default, a standby server keeps streaming XLOG records from the