|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have been having troubles to get the tests to pass with PG version
9.5 and 9.6.
Not sure why but when we try to start the secondaries (after the whole
cluster setup) they don't want to start with the following logs:
```
Starting PostgreSQL 9.6 database server: main
The PostgreSQL server failed to start. Please check the log output:
2020-05-11 13:18:11.883 UTC [6403] LOG: database system was shut down at 2020-05-11 13:16:41 UTC
ssh: connect to host postgres_barman port 22: Connection refused
ERROR: The required file is not available: 00000002.history
2020-05-11 13:18:12.236 UTC [6403] LOG: entering standby mode
2020-05-11 13:18:12.270 UTC [6409] [unknown]@[unknown] LOG: incomplete startup packet
ssh: connect to host postgres_barman port 22: Connection refused
ERROR: The required file is not available: 000000010000000000000001
2020-05-11 13:18:12.561 UTC [6403] WARNING: WAL was generated with wal_level=minimal, data may be missing
2020-05-11 13:18:12.561 UTC [6403] HINT: This happens if you temporarily set wal_level=minimal without taking a new base backup.
2020-05-11 13:18:12.561 UTC [6403] FATAL: hot standby is not possible because wal_level was not set to \"replica\" or higher on the master server
2020-05-11 13:18:12.561 UTC [6403] HINT: Either set wal_level to \"replica\" on the master, or turn off hot_standby here.
2020-05-11 13:18:12.563 UTC [6402] LOG: startup process (PID 6403) exited with exit code 1
2020-05-11 13:18:12.563 UTC [6402] LOG: aborting startup due to startup process failure
2020-05-11 13:18:12.576 UTC [6402] LOG: database system is shut down ... failed!
failed!
```
The fatal error being:
```
2020-05-11 13:18:12.561 UTC [6403] FATAL: hot standby is not possible because wal_level was not set to \"replica\" or higher on the master server
```
even if the cluster has been started with `logical` wal level from the
start.
It works with later version of PG 10+ so I can leave without those
versions being tested for now.
P.S.: for the sake of comparaison, here are the starting logs of the
secondaries with PG10 (the database starts accepting connections even
with the errors):
```
2020-05-11 15:45:52.640 UTC [8392] LOG: listening on IPv4 address "172.17.0.4", port 5432
2020-05-11 15:45:52.657 UTC [8392] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-05-11 15:45:52.806 UTC [8393] LOG: database system was shut down at 2020-05-11 15:44:10 UTC
ssh: connect to host postgres_barman port 22: Connection refused
ERROR: The required file is not available: 00000002.history
2020-05-11 15:45:53.226 UTC [8393] LOG: entering standby mode
ssh: connect to host postgres_barman port 22: Connection refused
ERROR: The required file is not available: 000000010000000000000001
2020-05-11 15:45:53.577 UTC [8393] LOG: consistent recovery state reached at 0/1632D20
2020-05-11 15:45:53.577 UTC [8393] LOG: invalid record length at 0/1632D20: wanted 24, got 0
2020-05-11 15:45:53.578 UTC [8392] LOG: database system is ready to accept read only connections
2020-05-11 15:45:53.598 UTC [8403] FATAL: could not connect to the primary server: FATAL: password authentication failed for user "replicator"
ssh: connect to host postgres_barman port 22: Connection refused
ERROR: The required file is not available: 00000002.history
2020-05-11 15:45:54.122 UTC [8409] [unknown]@[unknown] LOG: incomplete startup packet
```
|