From e6acd067be27d25703f33f4af99f80aea9c27cd4 Mon Sep 17 00:00:00 2001 From: Jonathan Sharman Date: Mon, 6 May 2024 14:17:56 -0700 Subject: [PATCH 1/2] feat: extend postgres backup to version 15 --- docker/Dockerfile | 2 +- docs/TipsAndTricks.md | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 40c33b6..a7e8deb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ # This image provides a postgres installation from which to run backups -FROM --platform=linux/amd64 quay.io/fedora/postgresql-14:14 +FROM --platform=linux/amd64 quay.io/fedora/postgresql-15:15 # Change timezone to PST for convenience ENV TZ=PST8PDT diff --git a/docs/TipsAndTricks.md b/docs/TipsAndTricks.md index 7b5ed99..ac33c2e 100644 --- a/docs/TipsAndTricks.md +++ b/docs/TipsAndTricks.md @@ -72,4 +72,28 @@ spec: cpu: '0' memory: '0' ... -``` \ No newline at end of file +``` + +## Patroni Verification and Restore Throws errors + +If you are using the postgres restoration process to restor patroni you will get some errors in the form: + +``` +DETAIL: Could not open extension control file "/usr/share/pgsql/extension/pg_stat_kcache.control": No such file or directory. +HINT: The extension must first be installed on the system where PostgreSQL is running. +ERROR: extension "pg_stat_kcache" does not exist +ERROR: extension "set_user" is not available +DETAIL: Could not open extension control file "/usr/share/pgsql/extension/set_user.control": No such file or directory. +HINT: The extension must first be installed on the system where PostgreSQL is running. +ERROR: extension "set_user" does not exist +``` + +These extensions are not supported on the Fedora operating system. Which is used as the base image for the backup container, `quay.io/fedora/postgresql-15:15`. Adding the `-I` flag to the verify and restore process allows the container to restore your database in a patroni cluster. + +``` +./backup.sh -I -v all +./backup.sh -I -r <>:<>/<> +``` + +Note: Due to the ignore errors flad you will have to be more diligent that the backup process is working as expected with your database implementation. + From 24bb6485478746733bcda69ea9fd4c8e9b937063 Mon Sep 17 00:00:00 2001 From: Jonathan Sharman Date: Mon, 6 May 2024 14:23:43 -0700 Subject: [PATCH 2/2] chore: fix spelling --- docs/TipsAndTricks.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/TipsAndTricks.md b/docs/TipsAndTricks.md index ac33c2e..e911295 100644 --- a/docs/TipsAndTricks.md +++ b/docs/TipsAndTricks.md @@ -76,7 +76,7 @@ spec: ## Patroni Verification and Restore Throws errors -If you are using the postgres restoration process to restor patroni you will get some errors in the form: +If you are using the postgres restoration process to restore a patroni cluster you will get some errors in the form: ``` DETAIL: Could not open extension control file "/usr/share/pgsql/extension/pg_stat_kcache.control": No such file or directory. @@ -88,12 +88,12 @@ HINT: The extension must first be installed on the system where PostgreSQL is r ERROR: extension "set_user" does not exist ``` -These extensions are not supported on the Fedora operating system. Which is used as the base image for the backup container, `quay.io/fedora/postgresql-15:15`. Adding the `-I` flag to the verify and restore process allows the container to restore your database in a patroni cluster. +These extensions are not supported on the Fedora operating system. Which is used as the base image for the backup container, `quay.io/fedora/postgresql-15:15`. Adding the `-I` flag to the verify and restore processes allows the container to restore your database in a patroni cluster. ``` ./backup.sh -I -v all ./backup.sh -I -r <>:<>/<> ``` -Note: Due to the ignore errors flad you will have to be more diligent that the backup process is working as expected with your database implementation. +Note: Due to the ignore errors flag you will have to be diligent in verifying that that the restore process is working as expected with your database implementation.