February 2020
Intermediate to advanced
734 pages
38h 13m
English
There are limited circumstances where a node cannot be recovered, rewound, or rejoined. In these instances, it becomes necessary to essentially rebuild the node. When this happens, we can basically follow the procedure outlined in the Cloning a database with repmgr recipe to reintroduce the node to the cluster. If we're brave, we can even truncate the procedure to these commands as the postgres user on the failed node:
sudo systemctl stop postgresql@12-main rm -Rf /db/pgdata repmgr standby clone -h pgha2 -d repmgr sudo systemctl start postgresql@12-main
In past engagements, the author has even written scripts that attempt to use node rejoin, and if that command returns a nonzero exit code, it rebuilds the node, as shown ...
Read now
Unlock full access