timescale / timescaledb-wale

Dockerized WAL-E with an HTTP API
Apache License 2.0
21 stars 9 forks source link

restore does not work #4

Closed candysmurf closed 5 years ago

candysmurf commented 5 years ago

I was not able to make the restore work by following the doc at timescale. the timescaledb-recovered cannot start up with the following error:

2019-06-09 05:09:09.491 GMT [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2019-06-09 05:09:09.491 GMT [1] LOG:  listening on IPv6 address "::", port 5432
2019-06-09 05:09:09.493 GMT [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-06-09 05:09:09.500 GMT [21] LOG:  database system was interrupted; last known up at 2019-06-09 05:02:58 GMT
2019-06-09 05:09:09.500 GMT [21] LOG:  creating missing WAL directory "pg_wal/archive_status"
2019-06-09 05:09:09.628 GMT [21] LOG:  starting archive recovery
Connecting to wale (172.18.0.3:80)
-                    100% |********************************|    36  0:00:00 ETA

2019-06-09 05:09:10.036 GMT [21] FATAL:  hot standby is not possible because max_worker_processes = 8 is a lower setting than on the master server (its value was 17)
2019-06-09 05:09:10.036 GMT [1] LOG:  startup process (PID 21) exited with exit code 1
2019-06-09 05:09:10.036 GMT [1] LOG:  aborting startup due to startup process failure
2019-06-09 05:09:10.037 GMT [1] LOG:  database system is shut down
Fetched wal 0000000100000000000000022019-06-09 05:11:58.384 GMT [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2019-06-09 05:11:58.384 GMT [1] LOG:  listening on IPv6 address "::", port 5432
2019-06-09 05:11:58.387 GMT [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-06-09 05:11:58.394 GMT [22] LOG:  database system was interrupted while in recovery at log time 2019-06-09 05:02:44 GMT
2019-06-09 05:11:58.394 GMT [22] HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.
2019-06-09 05:11:58.521 GMT [22] LOG:  starting archive recovery
Connecting to wale (172.18.0.3:80)
-                    100% |********************************|    36  0:00:00 ETA

2019-06-09 05:11:58.944 GMT [22] FATAL:  hot standby is not possible because max_worker_processes = 8 is a lower setting than on the master server (its value was 17)
2019-06-09 05:11:58.944 GMT [1] LOG:  startup process (PID 22) exited with exit code 1
2019-06-09 05:11:58.944 GMT [1] LOG:  aborting startup due to startup process failure
2019-06-09 05:11:58.945 GMT [1] LOG:  database system is shut down
Fetched wal 000000010000000000000002%

After I modified the value of max_worker_processes=17, I got:

2019-06-09 05:48:17.832 GMT [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2019-06-09 05:48:17.832 GMT [1] LOG:  listening on IPv6 address "::", port 5432
2019-06-09 05:48:17.835 GMT [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-06-09 05:48:17.842 GMT [21] LOG:  database system was interrupted; last known up at 2019-06-09 05:02:58 GMT
2019-06-09 05:48:17.842 GMT [21] LOG:  creating missing WAL directory "pg_wal/archive_status"
2019-06-09 05:48:17.977 GMT [21] LOG:  starting archive recovery
Connecting to wale (172.18.0.3:80)
-                    100% |********************************|    36  0:00:00 ETA

2019-06-09 05:48:18.385 GMT [21] LOG:  invalid checkpoint record
2019-06-09 05:48:18.385 GMT [21] FATAL:  could not locate required checkpoint record
2019-06-09 05:48:18.385 GMT [21] HINT:  If you are not restoring from a backup, try removing the file "/var/lib/postgresql/data/pg_data/backup_label".
2019-06-09 05:48:18.386 GMT [1] LOG:  startup process (PID 21) exited with exit code 1
2019-06-09 05:48:18.386 GMT [1] LOG:  aborting startup due to startup process failure
2019-06-09 05:48:18.387 GMT [1] LOG:  database system is shut down
Fetched wal 000000010000000000000002%

Anything I miss? Your help is greatly appreciated.

candysmurf commented 5 years ago

I solved those issues myself. Basically it needs to specify the max_worker_processes to the higher number.