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_conninfoandprimary_slot_nameinrecovery.confit has to be either inpostgresql.confor in an included config file defined there.- you need to create
postgresql{-geo}/data/standby.signalfile 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.signalfile 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_dirconfig)
Proposal
- Extract the logic we now have in the
Makefile(i.e. thepostgresql-replicationtargets) into a script, e.g.support/postgresql-geo-replicate - Make that script PG version aware and do things differently for PG12 (as stated above)