Project

General

Profile

Feature #5315

cmd_standby: Data Directory vs. Configuration Directory?

Added by Michael Vitale almost 9 years ago.

Status:
New
Priority:
Normal
Start date:
05/14/2015
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

Normally on most distros except Ubuntu, you can run pg_ctl command to start, stop, init the cluster, etc. On Ubuntu, (it is much more elaborate, to my liking I must say), where pg_ctl is enclosed within the wrapper, pg_ctlcluster. Not only that, but there is a separation between the data directory and the configuration directory:
configuration directory: /etc/postgresql/<version>/main
data directory : /var/lib/postgresql/<version>/main

Now to the point and how it relates to PITR TOOLS. By default, PITR TOOLs uses pg_ctl. It offers the option to either copy your configuration files specified in cmd_standby.conf to the data directory, or just start pg_ctl with the confs specified on the command line:

no_copy_conf: true --> command line specification of confs
no_copy_conf: false--> confs are copied to data directory

It would be nice if we had another parameter defined right under pgdata in cmd_standby.ini:
pgdata: /var/lib/postgresql/9.3/main

-- new proposed attribute
pgconf: /etc/postgresql/9.3/main

one implementation solution of many:
The cmd_standby executable could be modified slightly so that whenever pg_ctl is invoked and if no_copy_conf is false, and pgconf is not empty, then copy the specified conf files to the pgconf directory instead of the default action: copying them to the data directory. Furthermore, when pg_ctl is invoked in these cases pass to it as the -D parameter, the conf directory, not the data directory.

No data to display

Also available in: Atom PDF