Skip to content

Fix Syntax error at or near "\"#925

Open
ahmad-sanad wants to merge 1 commit intodimitri:mainfrom
academia-edu:fix-pgdump-restrict-meta-syntax-error
Open

Fix Syntax error at or near "\"#925
ahmad-sanad wants to merge 1 commit intodimitri:mainfrom
academia-edu:fix-pgdump-restrict-meta-syntax-error

Conversation

@ahmad-sanad
Copy link
Copy Markdown

@ahmad-sanad ahmad-sanad commented Sep 25, 2025

Fixes #922 and tests

Postgres 17.6 (and 16.10, etc) added \restrict and \unrestrict metacommands to pg_dump output to mitigate a security issue. This code skips these lines when restoring roles.

17.6 change notes: https://www.postgresql.org/docs/17/release-17-6.html#RELEASE-17-6-CHANGES
CVE: https://www.postgresql.org/support/security/CVE-2025-8714/

Postgres 17.6 added \restrict and \unrestrict metacommands to pg_dump to
mitigate a security issue. This code skips these lines when restoring
roles.

17.6 release: https://www.postgresql.org/docs/17/release-17-6.html#RELEASE-17-6-CHANGES
CVE: https://www.postgresql.org/support/security/CVE-2025-8714/
teknogeek0 added a commit to teknogeek0/pgcopydb that referenced this pull request Dec 13, 2025
This commit addresses multiple test failures related to PostgreSQL 17.6+
security updates and Docker configuration issues.

Changes:
- Skip \restrict and \unrestrict metacommands in pg_dumpall output
  (CVE-2025-8714 mitigation added in PG 17.6, 16.11, etc.)
  Fixes: pagila, timescaledb test failures
  Reference: upstream PR dimitri#925

- Fix Docker ARG scoping in all Dockerfile.pg files
  ARG must be redeclared after FROM to be available in RUN commands
  Fixes: cdc-wal2json, follow-wal2json, cdc-endpos-between-transaction build failures

- Remove hardcoded Debian version from Docker images
  Changed postgres:VERSION-bookworm to postgres:VERSION
  Supports PG 16/17 (bookworm) and PG 18 (trixie) automatically
jmealo pushed a commit to jmealo/pgcopydb that referenced this pull request Jan 12, 2026
This commit addresses multiple test failures related to PostgreSQL 17.6+
security updates and Docker configuration issues.

Changes:
- Skip \restrict and \unrestrict metacommands in pg_dumpall output
  (CVE-2025-8714 mitigation added in PG 17.6, 16.11, etc.)
  Fixes: pagila, timescaledb test failures
  Reference: upstream PR dimitri#925

- Fix Docker ARG scoping in all Dockerfile.pg files
  ARG must be redeclared after FROM to be available in RUN commands
  Fixes: cdc-wal2json, follow-wal2json, cdc-endpos-between-transaction build failures

- Remove hardcoded Debian version from Docker images
  Changed postgres:VERSION-bookworm to postgres:VERSION
  Supports PG 16/17 (bookworm) and PG 18 (trixie) automatically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Syntax error at or near "\" when using clone

1 participant