[pgpool-general: 7181] The best way to enable PgPool and PostgreSQL server start automatically in the Pgpool + WatchDog Mode
J.L.
wantdrink at gmail.com
Sun Aug 9 18:05:01 JST 2020
Hi there,
I've installed pgpool 4.1.2 and postgresql 12.3 with watchdog based on
https://www.pgpool.net/docs/latest/en/html/example-cluster.html.
That is 3 machines with a VIP, pgpool service + watchdog service +
postgresql service running on each of them, 1 primary + 2 standby
postgresql.
The question is: is that possible to enable those services as auto started
even if I reboot all of them?
I checked running services on them:
[root at primary ~]# systemctl status postgresql-12
> postgresql-12.service - PostgreSQL 12 database server
> Loaded: loaded (/usr/lib/systemd/system/postgresql-12.service;
> disabled; vendor preset: disabled)
> Active: active (running) since Thu 2020-07-02 22:17:35 CDT; 1 months 6
> days ago
>
> [root at secondary1 ~]# systemctl status postgresql-12
> postgresql-12.service - PostgreSQL 12 database server
> Loaded: loaded (/usr/lib/systemd/system/postgresql-12.service;
> disabled; vendor preset: disabled)
> Active: inactive (dead)
>
> [root at secondary2 ~]# systemctl status postgresql-12
> postgresql-12.service - PostgreSQL 12 database server
> Loaded: loaded (/usr/lib/systemd/system/postgresql-12.service;
> disabled; vendor preset: disabled)
> Active: inactive (dead)
So the postgresql service on secondary 1 & 2 is not started by postgresql
service, they are triggered by pgpool with command like:
> /usr/pgsql-12/bin/postgres -D /var/lib/pgsql/12/data
And on the primary the ps aux shows
> /usr/pgsql-12/bin/postmaster -D /var/lib/pgsql/12/data/
Which means I can enable pgpool service on all 3 machines:
> systemctl enable pgpool
But shouldn't do the same for postgresql service like systemctl enable
postgresql-12.
Also I'm not sure if enabling services to start automatically will lead to
any issue.
Any suggestion or guidance about this is appreciated. I just want to make
the DB system recover even after rebooting.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20200809/83563ecf/attachment.htm>
More information about the pgpool-general
mailing list