restore action does not work with focal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PostgreSQL Charm |
Fix Released
|
High
|
Unassigned |
Bug Description
Hello,
Trying to test the restore action of the charm but it seems it does not work with postgresql 12 (default in focal).
Trying to restore using this command: juju run-action postgresql/3 wal-e-restore storage-
but the database failed to start again and had those logs:
2021-04-16 12:00:45 UTC [27775]: [11-1] db=,user= LOG: database system is shut down
2021-04-16 12:01:00.188 GMT [100589] LOG: skipping missing configuration file "/etc/postgresq
2021-04-16 12:01:00.189 GMT [100589] LOG: skipping missing configuration file "/etc/postgresq
2021-04-16 12:01:00 UTC [100589]: [3-1] db=,user= LOG: starting PostgreSQL 12.6 (Ubuntu 12.6-0ubuntu0.
2021-04-16 12:01:00 UTC [100589]: [4-1] db=,user= LOG: listening on IPv4 address "0.0.0.0", port 5432
2021-04-16 12:01:00 UTC [100589]: [5-1] db=,user= LOG: listening on IPv6 address "::", port 5432
2021-04-16 12:01:00 UTC [100589]: [6-1] db=,user= LOG: listening on Unix socket "/var/run/
2021-04-16 12:01:00 UTC [100590]: [1-1] db=,user= LOG: database system was interrupted; last known up at 2021-04-16 11:56:26 UTC
2021-04-16 12:01:00 UTC [100590]: [2-1] db=,user= LOG: creating missing WAL directory "pg_wal/
2021-04-16 12:01:00 UTC [100590]: [3-1] db=,user= FATAL: using recovery command file "recovery.conf" is not supported
2021-04-16 12:01:00 UTC [100589]: [7-1] db=,user= LOG: startup process (PID 100590) exited with exit code 1
2021-04-16 12:01:00 UTC [100589]: [8-1] db=,user= LOG: aborting startup due to startup process failure
2021-04-16 12:01:00 UTC [100589]: [9-1] db=,user= LOG: database system is shut down
After more troubleshooting it seems that postgresql 12 does not use recovery.conf file anymore and changed that with another process which is creating necessary parameters in postgresql.conf and a file called recovery.signal inside /var/lib/
Related branches
- Tom Haddon: Approve
- PostgreSQL Charm Maintainers: Pending requested
-
Diff: 271 lines (+190/-32)4 files modified.vscode/settings.json (+4/-0)
reactive/postgresql/postgresql.py (+5/-0)
reactive/postgresql/wal_e.py (+95/-32)
unit_tests/test_wal_backup_restore_standalone.py (+86/-0)
Changed in postgresql-charm: | |
status: | Confirmed → Fix Committed |
I'm hit by this and its being discussed in this thread aswell: https:/ /discourse. charmhub. io/t/backup- restore- to-from- filesystem- using-postgresq l-charm/ 5584