Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Allow external recovery_config_directory

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Allow external recovery_config_directory
Date: 2013-03-28 13:47:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committerspgsql-hackers
On 28.03.2013 14:45, Simon Riggs wrote:
> On 28 March 2013 11:36, Robert Haas<robertmhaas(at)gmail(dot)com>  wrote:
>> On Thu, Mar 28, 2013 at 6:23 AM, Simon Riggs<simon(at)2ndquadrant(dot)com>  wrote:
>>> No, it *would* take effect. The parameter is set in a config file that
>>> is not part of the backup, so if you start the server from the backup
>>> then it doesn't know that the recovery_config_directory had been set
>>> and so it would read the recovery.conf written by pg_basebackup.
>> Are you saying pg_basebackup doesn't back up postgresql.conf?  I thought it did.
> postgresql.conf will be backed up if it is present in the data
> directory. If it is not present, it is not backed up.


> Therefore anybody using pg_basebackup and the config_file parameter
> does *not* have an executable backup when used with the -R option, as
> Heikki was suggesting was a requirement for this patch.

That's not related to the -R option, the situation with config_file is 
the same with or without it. But yes, if you use config_file option to 
point outside the data directory, the config file won't be backed up. 
That feels intuitive to me, I wouldn't expect it to be. Same with 
include or include_dir directives in the config file, as well as 
hba_file and ident_file - I wouldn't expect any of the files that those 
point to to be included in the backup.

The filesystem-level backup procedure documented in the user manual, not 
using pg_basebackup, behaves the same.

> pg_basebackup's behaviour with respect to .conf files is undocumented
> so its a "feature" that it skips .conf files in the config_file case.

Ok. It's always beem self-evident to me, but I agree it should be 
documented. How about the attached?

- Heikki

Attachment: document-backup-of-config-files-outside-datadir.patch
Description: text/x-diff (1.5 KB)

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2013-03-28 14:11:07
Subject: Re: FDW for PostgreSQL
Previous:From: Fujii MasaoDate: 2013-03-28 13:12:26
Subject: Re: Support for REINDEX CONCURRENTLY

pgsql-committers by date

Next:From: Simon RiggsDate: 2013-03-28 15:07:08
Subject: Re: [COMMITTERS] pgsql: Allow external recovery_config_directory
Previous:From: Simon RiggsDate: 2013-03-28 12:45:28
Subject: Re: [COMMITTERS] pgsql: Allow external recovery_config_directory

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group