Hi,
Im getting this behavior :
In [12]: import os
...: import pypgoutput
...:
...: HOST = "172.41.0.2"
...: PORT = 5432
...: DATABASE_NAME = "redsystem_db"
...: USER = "postgres"
...: PASSWORD = "lol"
...:
...:
...: cdc_reader = pypgoutput.LogicalReplicationReader(
...: publication_name="test_pub",
...: slot_name="test_slot",
...: host=HOST,
...: database=DATABASE_NAME,
...: port=PORT,
...: user=USER,
...: password=PASSWORD,
...: )
...: for message in cdc_reader:
...: print(message.json(indent=2))
...:
...: cdc_reader.stop()
Error consuming stream from slot: 'test_slot'. publication "test_pub" does not exist
CONTEXT: slot "test_slot", output plugin "pgoutput", in the change callback, associated LSN 0/173BD10
But in postgres I can attest the slot and the publication exist.
redsystem_db=# CREATE PUBLICATION test_pub FOR ALL TABLES;
ERROR: publication "test_pub" already exists
slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | s
----------+----------+-----------+--------+--------------+-----------+--------+------------+------+--------------+-------------+---------------------+------------+--
test_slot | pgoutput | logical | 24576 | redsystem_db | f | f | | | 494 | 0/173BC70 | 0/173BCA8 | reserved |```
I'm using this inside a docker-compose network. The database is on another machine (cf the ip in my config). They can ping eachothers etc.
BUT your script is working well on my main machine with all the things locally (database + script).
Hi,
Im getting this behavior :
But in postgres I can attest the slot and the publication exist.