Before configuring Postgres 12, please follow the instructions at Install Postgres 12 to Linux Nodes.

Create a Directory to Store Data on the Primary Node

Initialize Postgres Database Server on the Primary Node

In this instance, initdb is located at /usr/pgsql-12/bin/initdb. Use the location of initdb to construct the parameters here.

Item
Location
Location of Postgres binaries /usr/pgsql-12/bin/
Data /datakeeper/pgsql/data

Start the Postgres Process on the Primary Node

[root@node-a ~]# su postgres -c "/usr/pgsql-12/bin/pg_ctl start -D /datakeeper/pgsql/data"
waiting for server to start....2020-12-30 03:40:20.925 UTC [6346] LOG:  starting PostgreSQL 12.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit
2020-12-30 03:40:20.926 UTC [6346] LOG:  listening on IPv6 address "::1", port 5432
2020-12-30 03:40:20.926 UTC [6346] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2020-12-30 03:40:20.932 UTC [6346] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-12-30 03:40:20.946 UTC [6346] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2020-12-30 03:40:20.960 UTC [6346] LOG:  redirecting log output to logging collector process
2020-12-30 03:40:20.960 UTC [6346] HINT:  Future log output will appear in directory "log".
 done
server started
Item
Location
Unix socket /tmp/.s.PGSQL.5432

Protecting PostgreSQL Resource with LifeKeeper

  1. Click in the LifeKeeper user interface.
  1. The Create Resource Wizard at node-a will appear. Select PostgreSQL Database as the Recovery Kit.
  1. Select the following parameters.
Item
Location
Switchback Type intelligent
Server node-a
PostgreSQL Executable Location /usr/pgsql-12/bin/
PostgreSQL Client Executable Location /usr/pgsql-12/bin/psql
PostgreSQL Administration Executable Location /usr/pgsql-12/bin/pg_ctl
PostgreSQL Data Directory /datakeeper/pgsql/data
PostgreSQL Port 5432
PostgreSQL Socket Path /tmp/.s.PGSQL.5432
Enter Database Administrator User postgres
PostgreSQL Logfile /tmp/pgsql-5432.lk.log
PostgreSQL Database Tag pgsql-5432

The wizard checks these values. Once “pgsql-5432” is successfully created on node-a, continue to the next steps.

  1. Select the following values in the Pre-Extend Wizard @ node-a.
Item
Location
Target Server node-b
Switchback Type intelligent
Template Priority 1
Target Priority 10

The wizard checks these values. Once the Pre-Extend check is complete, continue to the next steps.

  1. Select the following values in the Extend database/pgsql Resource @ node-a wizard.
Field
Value
PostgreSQL Executable Location /usr/pgsql-12/bin/
PostgreSQL Database Tag pgsql-5432

Now the PostgreSQL resource is defined on LifeKeeper. The wizard automatically defines a dependency between the PostgreSQL resource and the replicated disk (/datakeeper).

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment