openstack-helm-infra/postgresql/templates
Cliff Parsons 4964ea2a76 Fix drop databases issue in Postgresql restore
Recently, the Postgresql backups were modified to generate drop database
commands (--clean pgdumpall option). Also for single database restore,
a DROP DATABASE command was added before the restore so that the
database could be restored without duplicate rows. However, if there are
existing database connections (by the applications or other users), then
the drop database commands will fail. So for the duration of the restore
database operation, the databases being restored need to have their
existing connections dropped and new connections prevented until the
database(s) restored, then connections should be re-allowed.

Also found a problem with psql returning 0 (success code) even though
there were errors during its execution. The solution is to check the
output for errors and if there are any, dump out the log file for the
user to see and let the user know there are errors.

Lastly, a problem was found with the single database restortion, where
the database dump for a single database was being incorrectly extracted
from the psql dump file, resulting in the database not being restored
correctly (most of the db being wiped out). This patchset fixes that
issue as well.

Change-Id: I4db3f6ac7e9fe7cce6a432dfba056e17ad1e3f06
2020-06-30 19:39:00 +00:00
..
bin Fix drop databases issue in Postgresql restore 2020-06-30 19:39:00 +00:00
monitoring/prometheus Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
secrets Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
configmap-bin.yaml Backup/restore enhancements 2020-05-13 16:34:21 +00:00
configmap-etc.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
cron-job-backup-postgres.yaml Fix problems with DB utilities in HTK and Postgresql 2020-06-24 19:16:04 +00:00
job-image-repo-sync.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
job-ks-user.yaml Postgresql backup/restore enhancements 2020-04-22 22:31:48 +00:00
network_policy.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
pod-test.yaml Enable key-duplicates and octal-values yamllint checks 2020-06-17 13:14:30 -05:00
postgresql-backup-pvc.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
secret-admin.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
secret-audit.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
secret-backup-restore.yaml Fix problems with DB utilities in HTK and Postgresql 2020-06-24 19:16:04 +00:00
secret-replica.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
secret-rgw.yaml Backup/restore enhancements 2020-05-13 16:34:21 +00:00
secret-server.yaml (postgresql) Cert auth for replication connections 2019-08-06 00:03:54 -05:00
secrets-etc.yaml Enable yamllint rules for templates 2020-06-17 13:13:53 -05:00
service-postgres.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
service-restapi.yaml Enable yamllint rules for templates 2020-06-17 13:13:53 -05:00
statefulset.yaml Enable key-duplicates and octal-values yamllint checks 2020-06-17 13:14:30 -05:00