Make Geo work with PG12
Overview
In gitlab#216589 (closed) we did some research to see if Geo can be used with PG12.
It will work, but some changes are needed:
The summary of the changes required to support PG12 on GDK are:
- instead of setting
primary_conninfo
andprimary_slot_name
inrecovery.conf
it has to be either inpostgresql.conf
or in an included config file defined there.- you need to create
postgresql{-geo}/data/standby.signal
file in each follower instance before starting it for the first time (if I forgot to do this and tried to do later, the follower would desync for some reason)the
standby.signal
file has no side-effect so it can be created independent of postgres version.for the version dependent changes, we need to verify current postgres version (by querying the defined postgres binary using specified by
bin_dir
config)
Proposal
- Extract the logic we now have in the
Makefile
(i.e. thepostgresql-replication
targets) into a script, e.g.support/postgresql-geo-replicate
- Make that script PG version aware and do things differently for PG12 (as stated above)