Geo setup instructions fail for the secondary
In particular, running make postgresql-replication-secondary
was fraught:
lupine@gitlab-t470p:~/dev/gitlab.com/gitlab-org/gdk-geo$ rm -rf postgresql
lupine@gitlab-t470p:~/dev/gitlab.com/gitlab-org/gdk-geo$ make postgresql-replication-secondary
/usr/lib/postgresql/9.6/bin/initdb --locale=C -E utf-8 postgresql/data
The files belonging to this database system will be owned by user "lupine".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".
Data page checksums are disabled.
creating directory postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/usr/lib/postgresql/9.6/bin/pg_ctl -D postgresql/data -l logfile start
cat support/pg_hba.conf.add >> postgresql/data/pg_hba.conf
psql -h /home/lupine/dev/gitlab.com/gitlab-org/gdk-geo/postgresql -d postgres -c "select pg_start_backup('base backup for streaming rep')"
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/home/lupine/dev/gitlab.com/gitlab-org/gdk-geo/postgresql/.s.PGSQL.5432"?
Makefile:208: recipe for target 'postgresql-replication/backup' failed
make: *** [postgresql-replication/backup] Error 2
Starting the database at this failure point and running make postgresql-replication/backup
also failed:
lupine@gitlab-t470p:~/dev/gitlab.com/gitlab-org/gdk-geo$ make postgresql-replication/backup
psql -h /home/lupine/dev/gitlab.com/gitlab-org/gdk-geo/postgresql -d postgres -c "select pg_start_backup('base backup for streaming rep')"
ERROR: WAL level not sufficient for making an online backup
HINT: wal_level must be set to "replica" or "logical" at server start.
Makefile:208: recipe for target 'postgresql-replication/backup' failed
make: *** [postgresql-replication/backup] Error 1
What did work was running make postgresql-replication-secondary
until error, running make postgresql-replication/config
, starting the postgres server on the secondary, then running make postgresql-replication/backup
So at a minimum, I guess we need to swap the position of the final two targets.
How do we start the DB in the makefile to run postgresql-replication/backup
? Do we have to run this?