From 14adbeb611e5e8e46ae39cb403f3b44fcd2ab65a Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 6 Nov 2026 12:48:41 +0000 Subject: [PATCH 1/8] Bumping version to 6.0.2 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 6d54bbd..7a9f89d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.1 \ No newline at end of file +6.0.2 \ No newline at end of file From 7314ec0d4b4daacdcc3a8013f784c6249df4b7d1 Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 6 Nov 2026 12:49:04 +0000 Subject: [PATCH 2/8] Keep the old data when restoring a dump Move the files in /data to /backup/-before-restore instead of deleting them. psql exits 0 when statements fail, so a bad dump could leave a partial cluster with no copy of the old data. The folder expires with the other backups. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- .../etc/nu/scripts/bf-postgresql/restore.nu | 20 ++++++++++++++---- overlay/etc/nu/scripts/tests/files.nu | 21 +++++++++++++++++++ 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b96f775..3d050de 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ At a random minute every eight hours (00:xx, 08:xx and 16:xx in `BF_TZ`), `pg-du ### Restore -`pg-restore ` restores a backup folder's `dump.sql` (or `dump.sql.bz2`), e.g. `pg-restore 202610171608`. It **replaces the whole cluster**: PostgreSQL is stopped, `/data` is emptied, a new cluster is created from the dump, and PostgreSQL starts again. +`pg-restore ` restores a backup folder's `dump.sql` (or `dump.sql.bz2`), e.g. `pg-restore 202610171608`. It **replaces the whole cluster**: PostgreSQL is stopped, the files in `/data` are moved to `/backup/-before-restore`, a new cluster is created from the dump, and PostgreSQL starts again. If the restore goes wrong, stop the container and move those files back into `/data`. The folder is removed with the other backups once it is older than `BF_PG_BACKUP_KEEP_FOR`. You can also restore while the container is stopped: put `dump.sql` or `dump.sql.bz2` in the root of `/backup` and start the container. The dump file is renamed `dump.sql.restored` once it has been restored, and `psql`'s errors are saved to `dump.sql.log` - check `docker logs` for a warning that some statements failed. diff --git a/overlay/etc/nu/scripts/bf-postgresql/restore.nu b/overlay/etc/nu/scripts/bf-postgresql/restore.nu index 012fa49..10b840a 100644 --- a/overlay/etc/nu/scripts/bf-postgresql/restore.nu +++ b/overlay/etc/nu/scripts/bf-postgresql/restore.nu @@ -27,10 +27,10 @@ export def main [] { ctl stop } - # delete data files - let data = bf env PG_DATA - bf write debug " .. deleting data files" restore - $"($data)/*" | into glob | rm --force --recursive $in + # move the current data out of the way - psql still exits 0 when statements fail, so a bad dump would otherwise + # leave a partial cluster with the old data gone + let kept = keep_data + if $kept != null { bf write $" .. current data moved to ($kept)." restore } # restart the PostgreSQL service bf write debug " .. reinitialising cluster" restore @@ -62,6 +62,18 @@ export def main [] { bf write ok "Done." restore } +# Move the files in the data directory to /-before-restore, so they can be recovered if a restore +# goes wrong (the folder expires like any other backup) - returns its path, or null if the data directory was empty +export def keep_data []: nothing -> any { + let data = bf env PG_DATA + if (ls $data | is-empty) { return } + + let dir = $"(bf env PG_BACKUP)/(date now | format date '%Y%m%d%H%M')-before-restore" + mkdir $dir + $"($data)/*" | into glob | mv $in $dir + $dir +} + # Return the errors in a psql log, ignoring the ones every restore of a pg_dumpall dump causes: the dump drops and # creates the postgres role, which already exists in the new cluster and cannot be dropped by itself export def errors [ diff --git a/overlay/etc/nu/scripts/tests/files.nu b/overlay/etc/nu/scripts/tests/files.nu index adf2fd5..ed7747d 100644 --- a/overlay/etc/nu/scripts/tests/files.nu +++ b/overlay/etc/nu/scripts/tests/files.nu @@ -57,6 +57,27 @@ export def restore__fails_when_backup_has_no_dump [] { assert error { with-env $env_vars { bf-postgresql restore from "202601010000" } } } +export def keep_data__moves_data_to_backup_folder [] { + let env_vars = helpers pg_env + "16" | save $"($env_vars.BF_PG_DATA)/PG_VERSION" + mkdir $"($env_vars.BF_PG_DATA)/base" + + let kept = with-env $env_vars { bf-postgresql restore keep_data } + + assert equal $env_vars.BF_PG_BACKUP ($kept | path dirname) + assert (($kept | path basename) =~ '^\d{12}-before-restore$') "folder should be named yyyyMMddHHmm-before-restore" + assert equal "16" (open --raw $"($kept)/PG_VERSION") + assert equal "dir" ($"($kept)/base" | path type) + assert (ls $env_vars.BF_PG_DATA | is-empty) "data directory should be empty" +} + +export def keep_data__does_nothing_when_data_is_empty [] { + let env_vars = helpers pg_env + + assert equal null (with-env $env_vars { bf-postgresql restore keep_data }) + assert (ls $env_vars.BF_PG_BACKUP | is-empty) "no folder should be created" +} + export def restore_errors__ignores_errors_every_restore_causes [] { let log = mktemp [ From e522aa11771ff895d586d0a2de0ec256e24b632e Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 6 Nov 2026 13:45:20 +0000 Subject: [PATCH 3/8] Accept spaces as well as commas in BF_PG_DATABASE So a list copied from bfren/mariadb works here too. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- overlay/etc/nu/scripts/bf-postgresql/db.nu | 4 ++-- overlay/etc/nu/scripts/tests/db.nu | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3d050de..b40824b 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ Everything in the volumes is owned by `postgres` (UID / GID 1000), and only read | `BF_PG_APPLICATION` | string | Default for `BF_PG_USERNAME`, `BF_PG_PASSWORD` and `BF_PG_DATABASE`. | | | `BF_PG_USERNAME` | string | Application user - created on first start. | | | `BF_PG_PASSWORD` | string | Application user's password - set on first start. | | -| `BF_PG_DATABASE` | names | Database(s) created on first start - separate several with commas. | | +| `BF_PG_DATABASE` | names | Database(s) created on first start - separate with commas or spaces. | | | `BF_PG_BACKUP_COMPRESS_FILES` | `0`, `1` | Compress backup files with bzip2. | `0` | | `BF_PG_BACKUP_KEEP_FOR` | [Nu duration](https://www.nushell.sh/book/types_of_data.html#durations) | How long to keep backups, e.g. `14day` or `8wk` (Nu has no months). | `28day` | diff --git a/overlay/etc/nu/scripts/bf-postgresql/db.nu b/overlay/etc/nu/scripts/bf-postgresql/db.nu index 13397d2..8519d9e 100644 --- a/overlay/etc/nu/scripts/bf-postgresql/db.nu +++ b/overlay/etc/nu/scripts/bf-postgresql/db.nu @@ -32,9 +32,9 @@ export def get_all []: nothing -> list { { ^pg psql -At -c $sql } | bf handle -d "Selecting PostgreSQL databases" db/get_all | lines | without_system } -# Split a comma-separated list of database names (e.g. BF_PG_DATABASE), removing spaces and empty names +# Split a list of database names (e.g. BF_PG_DATABASE) separated by commas and / or spaces, removing empty names export def names []: string -> list { - split row "," | str trim | where {|x| $x != "" } + split row --regex '[\s,]+' | where {|x| $x != "" } } # Remove system databases and empty values from a list of database names diff --git a/overlay/etc/nu/scripts/tests/db.nu b/overlay/etc/nu/scripts/tests/db.nu index c688e2a..669b013 100644 --- a/overlay/etc/nu/scripts/tests/db.nu +++ b/overlay/etc/nu/scripts/tests/db.nu @@ -11,6 +11,10 @@ export def names__splits_on_commas_and_removes_spaces [] { assert equal ["one" "two" "three"] ("one, two ,three" | db names) } +export def names__splits_on_spaces [] { + assert equal ["one" "two" "three"] ("one two three" | db names) +} + export def names__ignores_empty_names [] { assert equal ["one"] ("one,, ," | db names) assert equal [] ("" | db names) From c409da7071e204f053cadc43bdd712f6e015ef3d Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 6 Nov 2026 13:48:36 +0000 Subject: [PATCH 4/8] Never move restore data into an existing folder Name the before-restore folder down to the second and stop if it already exists - mv overwrites or skips files in an existing folder without an error, so two restores in the same minute mixed the saved copy with the second cluster. Also stop if any files are left in /data after the move (e.g. the disk is full). Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- overlay/etc/nu/scripts/bf-postgresql/restore.nu | 12 +++++++++--- overlay/etc/nu/scripts/tests/files.nu | 16 +++++++++++++++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b40824b..a5174be 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ At a random minute every eight hours (00:xx, 08:xx and 16:xx in `BF_TZ`), `pg-du ### Restore -`pg-restore ` restores a backup folder's `dump.sql` (or `dump.sql.bz2`), e.g. `pg-restore 202610171608`. It **replaces the whole cluster**: PostgreSQL is stopped, the files in `/data` are moved to `/backup/-before-restore`, a new cluster is created from the dump, and PostgreSQL starts again. If the restore goes wrong, stop the container and move those files back into `/data`. The folder is removed with the other backups once it is older than `BF_PG_BACKUP_KEEP_FOR`. +`pg-restore ` restores a backup folder's `dump.sql` (or `dump.sql.bz2`), e.g. `pg-restore 202610171608`. It **replaces the whole cluster**: PostgreSQL is stopped, the files in `/data` are moved to `/backup/-before-restore` (so `/backup` needs room for a copy of `/data` if it is on another volume), a new cluster is created from the dump, and PostgreSQL starts again. If the restore goes wrong, stop the container and move those files back into `/data`. The folder is removed with the other backups once it is older than `BF_PG_BACKUP_KEEP_FOR`. You can also restore while the container is stopped: put `dump.sql` or `dump.sql.bz2` in the root of `/backup` and start the container. The dump file is renamed `dump.sql.restored` once it has been restored, and `psql`'s errors are saved to `dump.sql.log` - check `docker logs` for a warning that some statements failed. diff --git a/overlay/etc/nu/scripts/bf-postgresql/restore.nu b/overlay/etc/nu/scripts/bf-postgresql/restore.nu index 10b840a..b447285 100644 --- a/overlay/etc/nu/scripts/bf-postgresql/restore.nu +++ b/overlay/etc/nu/scripts/bf-postgresql/restore.nu @@ -62,15 +62,21 @@ export def main [] { bf write ok "Done." restore } -# Move the files in the data directory to /-before-restore, so they can be recovered if a restore -# goes wrong (the folder expires like any other backup) - returns its path, or null if the data directory was empty +# Move the files in the data directory to /-before-restore, so they can be recovered if a +# restore goes wrong (the folder expires like any other backup) - returns its path, or null if the data directory was +# empty export def keep_data []: nothing -> any { let data = bf env PG_DATA if (ls $data | is-empty) { return } - let dir = $"(bf env PG_BACKUP)/(date now | format date '%Y%m%d%H%M')-before-restore" + # never move into an existing folder - mv would overwrite or skip files there without an error + let dir = $"(bf env PG_BACKUP)/(date now | format date '%Y%m%d%H%M%S')-before-restore" + if ($dir | path exists) { bf write error $"($dir) already exists - wait a second and try again." restore/keep_data } mkdir $dir $"($data)/*" | into glob | mv $in $dir + + # mv does not fail if some files cannot be moved (e.g. the disk is full), so check nothing was left behind + if (ls $data | is-not-empty) { bf write error $"Unable to move all files from ($data) to ($dir)." restore/keep_data } $dir } diff --git a/overlay/etc/nu/scripts/tests/files.nu b/overlay/etc/nu/scripts/tests/files.nu index ed7747d..4560da1 100644 --- a/overlay/etc/nu/scripts/tests/files.nu +++ b/overlay/etc/nu/scripts/tests/files.nu @@ -65,12 +65,26 @@ export def keep_data__moves_data_to_backup_folder [] { let kept = with-env $env_vars { bf-postgresql restore keep_data } assert equal $env_vars.BF_PG_BACKUP ($kept | path dirname) - assert (($kept | path basename) =~ '^\d{12}-before-restore$') "folder should be named yyyyMMddHHmm-before-restore" + assert (($kept | path basename) =~ '^\d{14}-before-restore$') "folder should be named yyyyMMddHHmmss-before-restore" assert equal "16" (open --raw $"($kept)/PG_VERSION") assert equal "dir" ($"($kept)/base" | path type) assert (ls $env_vars.BF_PG_DATA | is-empty) "data directory should be empty" } +export def keep_data__fails_without_moving_when_folder_exists [] { + let env_vars = helpers pg_env + "16" | save $"($env_vars.BF_PG_DATA)/PG_VERSION" + + # create the folder for this second and the next few, so the test does not depend on timing + let now = date now + 0..5 | each {|s| + mkdir $"($env_vars.BF_PG_BACKUP)/($now + ($s * 1sec) | format date '%Y%m%d%H%M%S')-before-restore" + } | ignore + + assert error { with-env $env_vars { bf-postgresql restore keep_data } } + assert equal "16" (open --raw $"($env_vars.BF_PG_DATA)/PG_VERSION") "data should not be moved" +} + export def keep_data__does_nothing_when_data_is_empty [] { let env_vars = helpers pg_env From 4ef71243e592b21ed6ee6e06538da2613ca02fef Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 6 Nov 2026 13:57:12 +0000 Subject: [PATCH 5/8] Revert keeping the old data when restoring a dump Restores delete /data again, as in v6.0.1. Moving the data to /backup needed room there for a full copy, and a restore stopped part-way (with PostgreSQL down) when there was not enough - a failure the release before did not have. This reverts commits 7314ec0 and c409da7. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- .../etc/nu/scripts/bf-postgresql/restore.nu | 26 +++----------- overlay/etc/nu/scripts/tests/files.nu | 35 ------------------- 3 files changed, 5 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index a5174be..b53e3bb 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ At a random minute every eight hours (00:xx, 08:xx and 16:xx in `BF_TZ`), `pg-du ### Restore -`pg-restore ` restores a backup folder's `dump.sql` (or `dump.sql.bz2`), e.g. `pg-restore 202610171608`. It **replaces the whole cluster**: PostgreSQL is stopped, the files in `/data` are moved to `/backup/-before-restore` (so `/backup` needs room for a copy of `/data` if it is on another volume), a new cluster is created from the dump, and PostgreSQL starts again. If the restore goes wrong, stop the container and move those files back into `/data`. The folder is removed with the other backups once it is older than `BF_PG_BACKUP_KEEP_FOR`. +`pg-restore ` restores a backup folder's `dump.sql` (or `dump.sql.bz2`), e.g. `pg-restore 202610171608`. It **replaces the whole cluster**: PostgreSQL is stopped, `/data` is emptied, a new cluster is created from the dump, and PostgreSQL starts again. You can also restore while the container is stopped: put `dump.sql` or `dump.sql.bz2` in the root of `/backup` and start the container. The dump file is renamed `dump.sql.restored` once it has been restored, and `psql`'s errors are saved to `dump.sql.log` - check `docker logs` for a warning that some statements failed. diff --git a/overlay/etc/nu/scripts/bf-postgresql/restore.nu b/overlay/etc/nu/scripts/bf-postgresql/restore.nu index b447285..012fa49 100644 --- a/overlay/etc/nu/scripts/bf-postgresql/restore.nu +++ b/overlay/etc/nu/scripts/bf-postgresql/restore.nu @@ -27,10 +27,10 @@ export def main [] { ctl stop } - # move the current data out of the way - psql still exits 0 when statements fail, so a bad dump would otherwise - # leave a partial cluster with the old data gone - let kept = keep_data - if $kept != null { bf write $" .. current data moved to ($kept)." restore } + # delete data files + let data = bf env PG_DATA + bf write debug " .. deleting data files" restore + $"($data)/*" | into glob | rm --force --recursive $in # restart the PostgreSQL service bf write debug " .. reinitialising cluster" restore @@ -62,24 +62,6 @@ export def main [] { bf write ok "Done." restore } -# Move the files in the data directory to /-before-restore, so they can be recovered if a -# restore goes wrong (the folder expires like any other backup) - returns its path, or null if the data directory was -# empty -export def keep_data []: nothing -> any { - let data = bf env PG_DATA - if (ls $data | is-empty) { return } - - # never move into an existing folder - mv would overwrite or skip files there without an error - let dir = $"(bf env PG_BACKUP)/(date now | format date '%Y%m%d%H%M%S')-before-restore" - if ($dir | path exists) { bf write error $"($dir) already exists - wait a second and try again." restore/keep_data } - mkdir $dir - $"($data)/*" | into glob | mv $in $dir - - # mv does not fail if some files cannot be moved (e.g. the disk is full), so check nothing was left behind - if (ls $data | is-not-empty) { bf write error $"Unable to move all files from ($data) to ($dir)." restore/keep_data } - $dir -} - # Return the errors in a psql log, ignoring the ones every restore of a pg_dumpall dump causes: the dump drops and # creates the postgres role, which already exists in the new cluster and cannot be dropped by itself export def errors [ diff --git a/overlay/etc/nu/scripts/tests/files.nu b/overlay/etc/nu/scripts/tests/files.nu index 4560da1..adf2fd5 100644 --- a/overlay/etc/nu/scripts/tests/files.nu +++ b/overlay/etc/nu/scripts/tests/files.nu @@ -57,41 +57,6 @@ export def restore__fails_when_backup_has_no_dump [] { assert error { with-env $env_vars { bf-postgresql restore from "202601010000" } } } -export def keep_data__moves_data_to_backup_folder [] { - let env_vars = helpers pg_env - "16" | save $"($env_vars.BF_PG_DATA)/PG_VERSION" - mkdir $"($env_vars.BF_PG_DATA)/base" - - let kept = with-env $env_vars { bf-postgresql restore keep_data } - - assert equal $env_vars.BF_PG_BACKUP ($kept | path dirname) - assert (($kept | path basename) =~ '^\d{14}-before-restore$') "folder should be named yyyyMMddHHmmss-before-restore" - assert equal "16" (open --raw $"($kept)/PG_VERSION") - assert equal "dir" ($"($kept)/base" | path type) - assert (ls $env_vars.BF_PG_DATA | is-empty) "data directory should be empty" -} - -export def keep_data__fails_without_moving_when_folder_exists [] { - let env_vars = helpers pg_env - "16" | save $"($env_vars.BF_PG_DATA)/PG_VERSION" - - # create the folder for this second and the next few, so the test does not depend on timing - let now = date now - 0..5 | each {|s| - mkdir $"($env_vars.BF_PG_BACKUP)/($now + ($s * 1sec) | format date '%Y%m%d%H%M%S')-before-restore" - } | ignore - - assert error { with-env $env_vars { bf-postgresql restore keep_data } } - assert equal "16" (open --raw $"($env_vars.BF_PG_DATA)/PG_VERSION") "data should not be moved" -} - -export def keep_data__does_nothing_when_data_is_empty [] { - let env_vars = helpers pg_env - - assert equal null (with-env $env_vars { bf-postgresql restore keep_data }) - assert (ls $env_vars.BF_PG_BACKUP | is-empty) "no folder should be created" -} - export def restore_errors__ignores_errors_every_restore_causes [] { let log = mktemp [ From ff13858f77c7fc4f16030af1ee72f6bb298c3ae0 Mon Sep 17 00:00:00 2001 From: bfren Date: Fri, 6 Nov 2026 13:57:25 +0000 Subject: [PATCH 6/8] Recommend a backup before restoring A restore deletes the current data before loading the dump, so the README now says to run pg-dump (or copy /data) first. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b53e3bb..e281e1e 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,8 @@ At a random minute every eight hours (00:xx, 08:xx and 16:xx in `BF_TZ`), `pg-du `pg-restore ` restores a backup folder's `dump.sql` (or `dump.sql.bz2`), e.g. `pg-restore 202610171608`. It **replaces the whole cluster**: PostgreSQL is stopped, `/data` is emptied, a new cluster is created from the dump, and PostgreSQL starts again. +**Back up first.** The current data is deleted before the dump is loaded, and `psql` carries on past errors - so a bad or incomplete dump leaves a partly restored cluster, with no way back to the data you had. Before restoring, run `pg-dump` (it saves the current cluster in a new backup folder), or stop the container and copy `/data` somewhere safe. The [upgrade steps](#version-check) below do this too. + You can also restore while the container is stopped: put `dump.sql` or `dump.sql.bz2` in the root of `/backup` and start the container. The dump file is renamed `dump.sql.restored` once it has been restored, and `psql`'s errors are saved to `dump.sql.log` - check `docker logs` for a warning that some statements failed. ### Export and import From cb99e0c690a0d2e04f87e708298126aedb7e3050 Mon Sep 17 00:00:00 2001 From: bfren Date: Tue, 10 Nov 2026 12:59:10 +0000 Subject: [PATCH 7/8] Using latest base images --- 14/Dockerfile | 2 +- 15/Dockerfile | 2 +- 16/Dockerfile | 2 +- 17/Dockerfile | 2 +- 18/Dockerfile | 2 +- generate-dockerfiles.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/14/Dockerfile b/14/Dockerfile index 5cad284..64ee82e 100644 --- a/14/Dockerfile +++ b/14/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bfren/alpine-s6:alpine3.20-7.0.1 +FROM quay.io/bfren/alpine-s6:alpine3.20-7.0.2 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/15/Dockerfile b/15/Dockerfile index 69fed05..658b9b4 100644 --- a/15/Dockerfile +++ b/15/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bfren/alpine-s6:alpine3.22-7.0.1 +FROM quay.io/bfren/alpine-s6:alpine3.22-7.0.2 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/16/Dockerfile b/16/Dockerfile index 367bfdf..9caeff7 100644 --- a/16/Dockerfile +++ b/16/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.1 +FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.2 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/17/Dockerfile b/17/Dockerfile index 2db3976..9f09099 100644 --- a/17/Dockerfile +++ b/17/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.1 +FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.2 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/18/Dockerfile b/18/Dockerfile index 8a592b0..59cab6c 100644 --- a/18/Dockerfile +++ b/18/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.1 +FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.2 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/generate-dockerfiles.sh b/generate-dockerfiles.sh index 0e4418c..6ee8c3e 100755 --- a/generate-dockerfiles.sh +++ b/generate-dockerfiles.sh @@ -4,7 +4,7 @@ set -euo pipefail docker pull bfren/alpine -BASE_VERSION="7.0.1" +BASE_VERSION="7.0.2" echo "Base: ${BASE_VERSION}" POSTGRESQL_VERSIONS="14 15 16 17 18" From 056df9f31b6cdafc98df5070710870a97ec0c41e Mon Sep 17 00:00:00 2001 From: bfren Date: Tue, 10 Nov 2026 13:22:54 +0000 Subject: [PATCH 8/8] Prepping for release Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 13 +++++++++++++ README.md | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1d6473..a03d33c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [6.0.2] - 2026-11-10 + +### Changed + +- Base image updated to `bfren/alpine-s6` 7.0.2, which updates Nushell to 0.117.0 (your own Nushell scripts may + need changes), keeps the container starting when `BF_TZ` cannot be set, and no longer hides `CURRENT_FILE` and + `FILE_PWD` from services - see the + [Alpine + S6 changelog](https://github.com/bfren/docker-alpine-s6/blob/main/CHANGELOG.md). +- `BF_PG_DATABASE` accepts spaces as well as commas between database names, as `bfren/mariadb` does. +- The README now says to back up before running `pg-restore`: a restore deletes the current data before loading the + dump, and `psql` carries on past errors, so a bad dump leaves a partly restored cluster. Restores work as in 6.0.1. + ## [6.0.1] - 2026-11-06 ### Changed @@ -31,5 +43,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 that much memory to back up. - `pg-export dump` is refused - `/backup/dump.sql` would replace the whole cluster on the next start. +[6.0.2]: https://github.com/bfren/docker-postgresql/compare/v6.0.1...v6.0.2 [6.0.1]: https://github.com/bfren/docker-postgresql/compare/v6.0.0...v6.0.1 [6.0.0]: https://github.com/bfren/docker-postgresql/compare/v5.0.0...v6.0.0 diff --git a/README.md b/README.md index e281e1e..5d498bc 100644 --- a/README.md +++ b/README.md @@ -60,9 +60,9 @@ Images are published to Docker Hub (`bfren/postgresql`) and Quay.io (`quay.io/bf | `postgresqlN` | `postgresql18` | You want the latest image for a PostgreSQL version | | `postgresqlN-MAJOR` | `postgresql18-6` | You want updates, but not breaking changes | | `postgresqlN-MINOR` | `postgresql18-6.0` | You want fixes only - **recommended** | -| `postgresqlN-VERSION` | `postgresql18-6.0.1` | You want to pin this image exactly | +| `postgresqlN-VERSION` | `postgresql18-6.0.2` | You want to pin this image exactly | | `postgresqlN.M` | `postgresql18.6` | You want an exact PostgreSQL release | -| `postgresqlN.M-VERSION` | `postgresql18.6-6.0.1` | You want to pin both | +| `postgresqlN.M-VERSION` | `postgresql18.6-6.0.2` | You want to pin both | | PostgreSQL | Release | Alpine | Supported until | | ---------- | ------- | ------ | --------------- |