Closed hgdeoro closed 2 months ago
For the record, using output_plugin="wal2json"
works (I haven't consume any message, but start_replication()
works)
with conn.cursor() as cur:
cur.create_replication_slot("pytest_logical", output_plugin="wal2json")
cur.start_replication(slot_name="pytest_logical", decode=False)
Sorry for the silence. Unfortunately I am not very familiar with the replication support and I don't have the bandwidth to work on this issue.
I'm new to replication too. Also, since wal2json worked, I don't know if this issue is caused by psycopg2. I'll try to run psycopg2 tests in these days and see if I discover something.
Please complete the following information:
postgres:16.2-alpine
(docker) PostgreSQL 16.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014, 64-bitpostgres:16.2
(docker) PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bitDescribe the bug Please let us know:
1: what you did
I can successfully
create_replication_slot()
andstart_replication()
when using thetest_decoding
output plugin:When trying to use the
pgoutput
plugin,create_replication_slot()
succeeds, butstart_replication()
fails:2: what you expected to happen
I expect to be able to use the
pgoutput
plugin, at least to be able to consume butstart_replication()
fails.The plugin is installed in both docker images that I tried
postgres:16.2-alpine
andpostgres:16.2
. I got the error in both flavors of PostgreSql 16.23: what happened instead
The error in Python is:
and I can see this logs in PostgreSql:
Since I'm using docker compose and some automated tests, I also tried
PostgreSQL 14.11 (Debian 14.11-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
with same results.If possible, provide a script reproducing the issue.