diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/clusterdb b/assets/tools/amd64/postgresql/postgresql-19/bin/clusterdb new file mode 100755 index 00000000..a9909543 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/clusterdb differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/createdb b/assets/tools/amd64/postgresql/postgresql-19/bin/createdb new file mode 100755 index 00000000..e6a6fff0 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/createdb differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/createuser b/assets/tools/amd64/postgresql/postgresql-19/bin/createuser new file mode 100755 index 00000000..c965d941 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/createuser differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/dropdb b/assets/tools/amd64/postgresql/postgresql-19/bin/dropdb new file mode 100755 index 00000000..89754756 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/dropdb differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/dropuser b/assets/tools/amd64/postgresql/postgresql-19/bin/dropuser new file mode 100755 index 00000000..83a64aba Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/dropuser differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_amcheck b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_amcheck new file mode 100755 index 00000000..dc39bfac Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_amcheck differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_basebackup b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_basebackup new file mode 100755 index 00000000..f7a6892f Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_basebackup differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_combinebackup b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_combinebackup new file mode 100755 index 00000000..7356a818 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_combinebackup differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_config b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_config new file mode 100755 index 00000000..192a280c Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_config differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_dump b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_dump new file mode 100755 index 00000000..3ca05bd0 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_dump differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_dumpall b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_dumpall new file mode 100755 index 00000000..f78f3d0c Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_dumpall differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_isready b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_isready new file mode 100755 index 00000000..bacf2f71 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_isready differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_receivewal b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_receivewal new file mode 100755 index 00000000..28c49647 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_receivewal differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_recvlogical b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_recvlogical new file mode 100755 index 00000000..fcaf2fc0 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_recvlogical differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_restore b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_restore new file mode 100755 index 00000000..e3c2bb8a Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_restore differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/pg_verifybackup b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_verifybackup new file mode 100755 index 00000000..70ed0834 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/pg_verifybackup differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/psql b/assets/tools/amd64/postgresql/postgresql-19/bin/psql new file mode 100755 index 00000000..ed67f82a Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/psql differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/reindexdb b/assets/tools/amd64/postgresql/postgresql-19/bin/reindexdb new file mode 100755 index 00000000..d2dfbf4b Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/reindexdb differ diff --git a/assets/tools/amd64/postgresql/postgresql-19/bin/vacuumdb b/assets/tools/amd64/postgresql/postgresql-19/bin/vacuumdb new file mode 100755 index 00000000..0b9f6137 Binary files /dev/null and b/assets/tools/amd64/postgresql/postgresql-19/bin/vacuumdb differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/clusterdb b/assets/tools/arm64/postgresql/postgresql-19/bin/clusterdb new file mode 100755 index 00000000..94f7c68c Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/clusterdb differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/createdb b/assets/tools/arm64/postgresql/postgresql-19/bin/createdb new file mode 100755 index 00000000..a15ad2f0 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/createdb differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/createuser b/assets/tools/arm64/postgresql/postgresql-19/bin/createuser new file mode 100755 index 00000000..cc777bb5 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/createuser differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/dropdb b/assets/tools/arm64/postgresql/postgresql-19/bin/dropdb new file mode 100755 index 00000000..c69060b8 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/dropdb differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/dropuser b/assets/tools/arm64/postgresql/postgresql-19/bin/dropuser new file mode 100755 index 00000000..5ea55786 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/dropuser differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_amcheck b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_amcheck new file mode 100755 index 00000000..11cac092 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_amcheck differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_basebackup b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_basebackup new file mode 100755 index 00000000..bef5aa02 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_basebackup differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_combinebackup b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_combinebackup new file mode 100755 index 00000000..86594293 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_combinebackup differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_config b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_config new file mode 100755 index 00000000..bf78ae17 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_config differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_dump b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_dump new file mode 100755 index 00000000..8befb7d2 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_dump differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_dumpall b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_dumpall new file mode 100755 index 00000000..1d440b9d Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_dumpall differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_isready b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_isready new file mode 100755 index 00000000..c0a78a3f Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_isready differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_receivewal b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_receivewal new file mode 100755 index 00000000..df3a97e0 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_receivewal differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_recvlogical b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_recvlogical new file mode 100755 index 00000000..52b942f7 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_recvlogical differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_restore b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_restore new file mode 100755 index 00000000..0eb98f07 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_restore differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/pg_verifybackup b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_verifybackup new file mode 100755 index 00000000..6389fb73 Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/pg_verifybackup differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/psql b/assets/tools/arm64/postgresql/postgresql-19/bin/psql new file mode 100755 index 00000000..1439acef Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/psql differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/reindexdb b/assets/tools/arm64/postgresql/postgresql-19/bin/reindexdb new file mode 100755 index 00000000..996ef8cd Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/reindexdb differ diff --git a/assets/tools/arm64/postgresql/postgresql-19/bin/vacuumdb b/assets/tools/arm64/postgresql/postgresql-19/bin/vacuumdb new file mode 100755 index 00000000..82e98f5c Binary files /dev/null and b/assets/tools/arm64/postgresql/postgresql-19/bin/vacuumdb differ diff --git a/databases.json b/databases.json index 33aa5fa0..62c30403 100644 --- a/databases.json +++ b/databases.json @@ -269,6 +269,40 @@ "method": "physical", "full_every_days": 7 } + }, + { + "name": "Test database - PostgreSQL 19", + "database": "devdb19", + "type": "postgresql", + "username": "devuser", + "password": "changeme", + "port": 5432, + "host": "db-postgres-19", + "generated_id": "19190000-0000-4000-8000-000000000001" + }, + { + "name": "Test database - PostgreSQL 19 cluster", + "database": "postgres", + "type": "postgresql-cluster", + "username": "devuser", + "password": "changeme", + "port": 5432, + "host": "db-postgres-19", + "generated_id": "19190000-0000-4000-8000-000000000002" + }, + { + "name": "Test database - PostgreSQL 19 physical incremental", + "database": "postgres", + "type": "postgresql-cluster", + "username": "portabase_backup", + "password": "changeme-physical", + "port": 5432, + "host": "db-postgres-19", + "generated_id": "19190000-0000-4000-8000-000000000003", + "options": { + "method": "physical", + "full_every_days": 7 + } } ] } diff --git a/docker-compose.databases.yml b/docker-compose.databases.yml index 6922603a..0cd73b8c 100644 --- a/docker-compose.databases.yml +++ b/docker-compose.databases.yml @@ -47,6 +47,22 @@ services: networks: - portabase + db-postgres-19: + container_name: db-postgres-19 + image: postgres:19-alpine + command: ["postgres", "-c", "summarize_wal=on", "-c", "checkpoint_timeout=60s"] + ports: + - "5441:5432" + volumes: + - postgres-data-19:/var/lib/postgresql + - ./scripts/postgres/physical-init.sh:/docker-entrypoint-initdb.d/10-physical.sh:ro + environment: + - POSTGRES_DB=devdb19 + - POSTGRES_USER=devuser + - POSTGRES_PASSWORD=changeme + networks: + - portabase + db-mariadb: container_name: db-mariadb image: mariadb:latest @@ -213,6 +229,7 @@ volumes: postgres-data: postgres-data-2: postgres-data-physical: + postgres-data-19: mariadb-data: mysql-data: mongodb-data: diff --git a/docker/Dockerfile b/docker/Dockerfile index d02fcc2c..55d89c59 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -72,26 +72,17 @@ RUN ARCH=$(dpkg --print-architecture) \ ARG TARGETARCH # ========================= -# PostgreSQL client binaries (versions 12-18) -# ========================= - -RUN for v in 12 13 14 15 16 17 18; do \ - mkdir -p /usr/lib/postgresql/$v/bin; \ - done - -COPY assets/tools/amd64/postgresql/ /tmp/pg-x64/ -COPY assets/tools/arm64/postgresql/ /tmp/pg-arm/ - -RUN if [ "$TARGETARCH" = "amd64" ]; then \ - for v in 12 13 14 15 16 17 18; do \ - cp -r /tmp/pg-x64/postgresql-$v/bin/* /usr/lib/postgresql/$v/bin/; \ - done; \ - elif [ "$TARGETARCH" = "arm64" ]; then \ - for v in 12 13 14 15 16 17 18; do \ - cp -r /tmp/pg-arm/postgresql-$v/bin/* /usr/lib/postgresql/$v/bin/; \ - done; \ - fi && \ - rm -rf /tmp/pg-x64 /tmp/pg-arm && \ +# PostgreSQL client binaries +# ========================= + +COPY assets/tools/${TARGETARCH}/postgresql/ /tmp/pg/ + +RUN for dir in /tmp/pg/postgresql-*; do \ + major=${dir##*-}; \ + mkdir -p /usr/lib/postgresql/$major; \ + cp -r $dir/bin /usr/lib/postgresql/$major/; \ + done && \ + rm -rf /tmp/pg && \ chmod +x /usr/lib/postgresql/*/bin/* diff --git a/scripts/postgres/fetch-clients.sh b/scripts/postgres/fetch-clients.sh index fd22fe11..dfb6f306 100755 --- a/scripts/postgres/fetch-clients.sh +++ b/scripts/postgres/fetch-clients.sh @@ -8,7 +8,7 @@ set -euo pipefail REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" SUITE="bookworm-pgdg" BASE="https://apt.postgresql.org/pub/repos/apt" -VERSIONS=(12 13 14 15 16 17 18) +VERSIONS=(12 13 14 15 16 17 18 19) ARCHES=(amd64 arm64) work="$(mktemp -d)" diff --git a/src/tests/domain/cluster/physical.rs b/src/tests/domain/cluster/physical.rs index 71e39938..e5a1e468 100644 --- a/src/tests/domain/cluster/physical.rs +++ b/src/tests/domain/cluster/physical.rs @@ -823,6 +823,11 @@ async fn chain_restore_round_trip_pg18() { chain_restore_round_trip("18").await; } +#[tokio::test] +async fn chain_restore_round_trip_pg19() { + chain_restore_round_trip("19").await; +} + #[tokio::test] async fn encrypted_chain_restores() { init_tracing_for_test();