Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logical replication #13

Open
gbartolini opened this issue Apr 11, 2022 · 8 comments
Open

Logical replication #13

gbartolini opened this issue Apr 11, 2022 · 8 comments

Comments

@gbartolini
Copy link
Contributor

Declarative way to publish changes to one or more tables using logical replication (publications), as well as to subscribe to any Postgres 10+ publication (subscriptions) and consume those events.

@gbartolini gbartolini added this to the 2022-Q3 milestone Apr 11, 2022
@ns-gzhang
Copy link

Any plan to support Debezium for CDC, which requires logical replication I believe?

@gbartolini gbartolini removed this from the 2022-Q3 milestone Oct 4, 2022
@abratanich
Copy link

Greetings. is it planned to add such support at the HA level in the near future?

@ns-jhu
Copy link

ns-jhu commented Jan 14, 2023

do we know when this feature is available ? without this , software such as debezium doesn't work well when postgres failover happens. In Zalando, we can config the replication_slot in the secondary, which is called permanent replication_slot, to enable debezium to work with postgres change event streaming seamlessly when failover happens. that is a highly desirable feature.

I checked version 1.18, and see this:

2		ctx,
3		`SELECT slot_name, slot_type, active, coalesce(restart_lsn::TEXT, '') AS restart_lsn FROM pg_replication_slots
4            WHERE NOT temporary AND slot_name ^@ $1 AND slot_type = 'physical'`,
5		config.HighAvailability.GetSlotPrefix(),
6	)

where only physical replication slots are supported, and it demands the slot to be prefixed with __cnpg__, this does not work well with debezium, as it is shown as this:


Unmanaged Replication Slot Status
Slot Name  Slot Type  Database  Active  Restart LSN  XMin  Catalog XMin  Datoid  Plugin    Wal Status  Safe Wal Size
---------  ---------  --------  ------  -----------  ----  ------------  ------  ------    ----------  -------------
debezium   logical    app       true    0/1600A540         1758          16385   pgoutput  reserved    NULL

@MathCharton
Copy link

Hello @mnencia !
Can u confirm that HA replication_slot feature only work with physical replication slots ???
Thanks

@ns-jhu
Copy link

ns-jhu commented Jan 18, 2023

Here is the code:

WHERE NOT temporary AND slot_name ^@ $1 AND slot_type = 'physical'`,

@ns-jhu
Copy link

ns-jhu commented Jan 18, 2023

we also need to remove the restriction that the replication slot has to start "cnpg" , as debezium 's replication slot is named "debezium"

@awebneck
Copy link

I've seen elsewhere that using the pg_failover_slots should support logical replication in CNPG, but after multiple attempts trying to get debezium to such a cluster I still don't seem to be able to establish things. What is the status of this issue?

@abratanich
Copy link

Everything works fine for me, show me the settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

6 participants