[pgpool-general: 8346] postgres start/stop with pgpool

Todd Stein todd.stein at microfocus.com
Sat Jul 23 00:10:30 JST 2022

I’m trying to find a “best practice” for startup/shutdown of postgres by the pgpool scripts.  The scripts use the postgres wrapper script “pg_ctl”.  Using the pg_ctl script presents a problem  in that if postgres is started by pg_ctl, the system status command will return false status.

pg_ctl start
waiting for server to start....2022-07-22 10:58:08.992 EDT [19552] LOG:  redirecting log output to logging collector process
2022-07-22 10:58:08.992 EDT [19552] HINT:  Future log output will appear in directory "log".
server started

-bash-4.2$ sudo systemctl status postgresql-13
● postgresql-13.service - PostgreSQL 13 database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql-13.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Fri 2022-07-22 10:57:57 EDT; 30s ago
     Docs: https://www.postgresql.org/docs/13/static/
  Process: 1975 ExecStart=/usr/pgsql-13/bin/postmaster -D ${PGDATA} (code=exited, status=0/SUCCESS)
  Process: 1969 ExecStartPre=/usr/pgsql-13/bin/postgresql-13-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
Main PID: 1975 (code=exited, status=0/SUCCESS)

I was previously given a recommendation (thanks Jon Schewe) to use polkit-1.  This quickly provided a response from others on my side to point out a vulnerability https://github.blog/2021-06-10-privilege-escalation-polkit-root-on-linux-with-bug/.

We want to use systemd process for auto start at boot.  If the answer is as simple as just modifying the scripts to use systemctl start as opposed to pg_ctl start, why do we still have pg_ctl included in the scripts provided by pgpool?  Based on this, I’d like to have a recommendation by pgpool developers for a “best-practice” method to handle starts and stops in the pgpool failover scripts.


Todd Stein
Sr. Technical Success Manager
OpsBridge Technical Success
Micro Focus
(Cell) +1 (941) 248-8752 Mobile Number
(Office)+1 404.774.1284
todd.stein at microfocus.com<mailto:todd.stein at microfocus.com>
[cid:image001.png at 01D89DB8.66C17F50]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20220722/b1262fe8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 989 bytes
Desc: image001.png
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20220722/b1262fe8/attachment.png>

More information about the pgpool-general mailing list