Skip to content

Separate CREATE SUBSCRIPTION options with commas - #454

Open
jihtsan wants to merge 1 commit into
postgrespro:masterfrom
jihtsan:codex/220-separate-subscription-options
Open

jihtsan wants to merge 1 commit into
postgrespro:masterfrom
jihtsan:codex/220-separate-subscription-options

Conversation

@jihtsan

@jihtsan jihtsan commented Oct 20, 2026

Copy link
Copy Markdown

Closes #220.

Subscription now joins the WITH (...) options with commas. The connection string continues using spaces. Multiple options previously produced invalid SQL such as WITH (copy_data=False enabled=True).

The existing real logical-replication test now supplies both copy_data=False and enabled=True when recreating a subscription, then verifies subsequent rows reach the subscriber. This also retains the no-option creation path earlier in the same test.

Validation on macOS, Python 3.11 and PostgreSQL 16.15:

  • The changed test fails with a syntax error at enabled on the original implementation for both local node configurations.
  • pytest -q tests/test_testgres_common.py -k 'test_logical_replication and local': 2 passed, 2 skipped after the fix.
  • Ruff 0.15.22 and flake8 passed on both changed files.

Local tests used psycopg2-binary instead of compiling psycopg2. Remote nodes, the complete test suite and the multi-version PostgreSQL CI matrix were not run.

This branch has not been deployed

No deployments
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.

An incorrect generation of parameter list for "CREATE SUBSCRIPTION" in Subscription class

1 participant