Bug 234879 - databases/postgresql10-server: Add 'promote' as a command to rc.d script
Summary: databases/postgresql10-server: Add 'promote' as a command to rc.d script
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: pgsql
Depends on:
Reported: 2019-01-11 18:53 UTC by Trix Farrar
Modified: 2019-01-12 14:13 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (pgsql)


Note You need to log in before you can comment on or make changes to this bug.
Description Trix Farrar 2019-01-11 18:53:11 UTC
In /usr/local/etc/rc.d/postgresql, adding a line:

promote_cmd="postgresql_command promote"

would allow scripts, like from databases/pgpool-II-40, to use the service(8) command to promote a replica rather than calling pg_ctl(1) directly and having to know the values of variables postgresql_data, etc.

The rc script already supports most of the other commonly used pg_ctl(1) commands.
Comment 1 Palle Girgensohn freebsd_committer 2019-01-12 14:13:05 UTC
Good idea! Thanks, I will look into it!