Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Key capabilities:
**Container-only builds are required.** Do not run `make` or `make bin` on the host — use containers to avoid dependency conflicts.

```bash
PGVERSION=16 make build # Build in container (Docker)
DOCKER=podman PGVERSION=16 make build # If using Podman instead of Docker
PGVERSION=18 make build # Build in container (Docker)
DOCKER=podman PGVERSION=18 make build # If using Podman instead of Docker
```

### Build dependencies (installed inside the container)
Expand All @@ -29,9 +29,9 @@ DOCKER=podman PGVERSION=16 make build # If using Podman instead of Docker
Always run tests before committing. Tests use Docker Compose to spin up PostgreSQL source/target instances.

```bash
PGVERSION=16 make tests # Run all 17 test suites
PGVERSION=16 make tests/pagila # Run a specific suite
PGVERSION=16 make tests/unit # Unit tests
PGVERSION=18 make tests # Run all test suites
PGVERSION=18 make tests/pagila # Run a specific suite
PGVERSION=18 make tests/unit # Unit tests
```

Test suites by category:
Expand Down Expand Up @@ -64,7 +64,7 @@ Documentation lives in `docs/` and is built with Sphinx (reStructuredText).
When adding or modifying CLI commands:

1. Update help text in the C source files
2. Build in container: `PGVERSION=16 make build`
2. Build in container: `PGVERSION=18 make build`
3. Run `make update-docs` to regenerate `docs/include/*.rst`
4. Commit both the code changes and the generated docs

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM debian:12-slim AS build
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG PGVERSION=16
ARG PGVERSION=18

# Configure apt to retry on transient failures
RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries
Expand Down Expand Up @@ -95,7 +95,7 @@ FROM debian:12-slim AS run
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG PGVERSION=16
ARG PGVERSION=18

# used to configure Github Packages
LABEL org.opencontainers.image.source=https://github.com/dimitri/pgcopydb
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

TOP := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
PGCOPYDB ?= $(TOP)src/bin/pgcopydb/pgcopydb
PGVERSION ?= 16
PGVERSION ?= 18
DOCKER ?= docker

all: bin ;
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile.pagila
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PGVERSION=16
ARG PGVERSION=18
ARG PGCOPYDB_IMAGE=pgcopydb:latest

# Create a named stage from the pgcopydb image for COPY --from
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2021 The PostgreSQL Global Development Group.
# Licensed under the PostgreSQL License.

PGVERSION ?= 17
PGVERSION ?= 18
export PGVERSION

# Auto-detect docker or podman
Expand Down
4 changes: 2 additions & 2 deletions tests/blob-snapshot-release/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
source:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -11,7 +11,7 @@ services:
-c wal_level=logical

target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/blobs/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
services:
source:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: h4ckm3
POSTGRES_HOST_AUTH_METHOD: trust
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/cdc-endpos-between-transaction/Dockerfile.pg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PGVERSION=16
ARG PGVERSION=18
FROM postgres:${PGVERSION}

ARG PGVERSION=16
ARG PGVERSION=18
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-${PGVERSION}-wal2json \
Expand Down
4 changes: 3 additions & 1 deletion tests/cdc-endpos-between-transaction/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
build:
context: .
dockerfile: Dockerfile.pg
args:
PGVERSION: ${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -16,7 +18,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/cdc-filtering-pgoutput/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
source:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -13,7 +13,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/cdc-filtering/Dockerfile.pg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PGVERSION=16
ARG PGVERSION=18
FROM postgres:${PGVERSION}

ARG PGVERSION=16
ARG PGVERSION=18
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-${PGVERSION}-wal2json \
Expand Down
4 changes: 3 additions & 1 deletion tests/cdc-filtering/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
build:
context: .
dockerfile: Dockerfile.pg
args:
PGVERSION: ${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -16,7 +18,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/cdc-low-level/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
source:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -13,7 +13,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/cdc-message-handling/Dockerfile.pg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PGVERSION=16
ARG PGVERSION=18
FROM postgres:${PGVERSION}

ARG PGVERSION=16
ARG PGVERSION=18
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-${PGVERSION}-wal2json \
Expand Down
4 changes: 3 additions & 1 deletion tests/cdc-message-handling/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
build:
context: .
dockerfile: Dockerfile.pg
args:
PGVERSION: ${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -16,7 +18,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/cdc-pgoutput/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
source:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -13,7 +13,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/cdc-prune/Dockerfile.pg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PGVERSION=16
ARG PGVERSION=18
FROM postgres:${PGVERSION}

ARG PGVERSION=16
ARG PGVERSION=18
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-${PGVERSION}-wal2json \
Expand Down
4 changes: 3 additions & 1 deletion tests/cdc-prune/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
build:
context: .
dockerfile: Dockerfile.pg
args:
PGVERSION: ${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -13,7 +15,7 @@ services:
-c wal_level=logical
-c output_plugin_libraries=pgoutput,test_decoding,wal2json
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/cdc-test-decoding/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
source:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -13,7 +13,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/cdc-wal2json/Dockerfile.pg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PGVERSION=16
ARG PGVERSION=18
FROM postgres:${PGVERSION}

ARG PGVERSION=16
ARG PGVERSION=18
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-${PGVERSION}-wal2json \
Expand Down
4 changes: 3 additions & 1 deletion tests/cdc-wal2json/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
build:
context: .
dockerfile: Dockerfile.pg
args:
PGVERSION: ${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -16,7 +18,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/copy-source-reconnect/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
source:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -12,7 +12,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/defer-validate-fks/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
source:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -12,7 +12,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
4 changes: 2 additions & 2 deletions tests/endpos-in-multi-wal-txn/Dockerfile.pg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PGVERSION=16
ARG PGVERSION=18
FROM postgres:${PGVERSION}

ARG PGVERSION=16
ARG PGVERSION=18
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-${PGVERSION}-wal2json \
Expand Down
4 changes: 3 additions & 1 deletion tests/endpos-in-multi-wal-txn/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
build:
context: .
dockerfile: Dockerfile.pg
args:
PGVERSION: ${PGVERSION:-18}
expose:
- 5432
environment:
Expand All @@ -16,7 +18,7 @@ services:
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
target:
image: postgres:${PGVERSION:-16}
image: postgres:${PGVERSION:-18}
expose:
- 5432
environment:
Expand Down
2 changes: 1 addition & 1 deletion tests/exclude-extension/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PGCOPYDB_IMAGE=pgcopydb:pg16
ARG PGCOPYDB_IMAGE=pgcopydb:pg18
FROM ${PGCOPYDB_IMAGE}

USER root
Expand Down
4 changes: 2 additions & 2 deletions tests/exclude-extension/Dockerfile.pg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PGVERSION=16
ARG PGVERSION=18
FROM postgres:${PGVERSION}

ARG PGVERSION=16
ARG PGVERSION=18
USER root

RUN apt-get update && \
Expand Down
Loading
Loading