You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ghcr.io/zalando/spilo-15:3.2-p1 (tried also with other versions) and when i try to restore db from WAL backup i have following error:
ERROR: schema "public" does not exist
2024-08-23 13:28:47,420 ERROR: post_init script /scripts/post_init.sh "zalandos" returned non-zero code 3
2024-08-23 13:28:47,421 INFO: removing initialize key after failed attempt to bootstrap the cluster
2024-08-23 13:28:47,459 INFO: renaming data directory to /home/postgres/pgdata/pgroot/data.failed
Traceback (most recent call last):
File "/usr/local/bin/patroni", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/patroni/__main__.py", line 344, in main
return patroni_main(args.configfile)
File "/usr/local/lib/python3.10/dist-packages/patroni/__main__.py", line 232, in patroni_main
abstract_main(Patroni, configfile)
File "/usr/local/lib/python3.10/dist-packages/patroni/daemon.py", line 174, in abstract_main
controller.run()
File "/usr/local/lib/python3.10/dist-packages/patroni/__main__.py", line 192, in run
super(Patroni, self).run()
File "/usr/local/lib/python3.10/dist-packages/patroni/daemon.py", line 143, in run
self._run_cycle()
File "/usr/local/lib/python3.10/dist-packages/patroni/__main__.py", line 201, in _run_cycle
logger.info(self.ha.run_cycle())
File "/usr/local/lib/python3.10/dist-packages/patroni/ha.py", line 1972, in run_cycle
info = self._run_cycle()
File "/usr/local/lib/python3.10/dist-packages/patroni/ha.py", line 1786, in _run_cycle
return self.post_bootstrap()
File "/usr/local/lib/python3.10/dist-packages/patroni/ha.py", line 1670, in post_bootstrap
self.cancel_initialization()
File "/usr/local/lib/python3.10/dist-packages/patroni/ha.py", line 1663, in cancel_initialization
raise PatroniFatalException('Failed to bootstrap cluster')
patroni.exceptions.PatroniFatalException: Failed to bootstrap cluster
We probably just need:
CREATE SCHEMA IF NOT EXISTS public
In post_init.sh to successfully add extensions etc
Also if anyone knows solution how i can restore db without creating my own docker image, please help :)
The text was updated successfully, but these errors were encountered:
I just changed create_user_functions.sql, added CREATE SCHEMA IF NOT EXISTS public; and with custom docker image restore now works.
Still think that this should be added in official containers.
I'm using ghcr.io/zalando/spilo-15:3.2-p1 (tried also with other versions) and when i try to restore db from WAL backup i have following error:
We probably just need:
In post_init.sh to successfully add extensions etc
Also if anyone knows solution how i can restore db without creating my own docker image, please help :)
The text was updated successfully, but these errors were encountered: