GithubHelp home page GithubHelp logo

Logical replication about cloudnative-pg HOT 8 OPEN

gbartolini avatar gbartolini commented on May 19, 2024 6
Logical replication

from cloudnative-pg.

Comments (8)

ns-gzhang avatar ns-gzhang commented on May 19, 2024 4

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

from cloudnative-pg.

ns-jhu avatar ns-jhu commented on May 19, 2024 1

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

from cloudnative-pg.

abratanich avatar abratanich commented on May 19, 2024

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

from cloudnative-pg.

MathCharton avatar MathCharton commented on May 19, 2024

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

from cloudnative-pg.

ns-jhu avatar ns-jhu commented on May 19, 2024

Here is the code:

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

from cloudnative-pg.

ns-jhu avatar ns-jhu commented on May 19, 2024

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

from cloudnative-pg.

awebneck avatar awebneck commented on May 19, 2024

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?

from cloudnative-pg.

abratanich avatar abratanich commented on May 19, 2024

Everything works fine for me, show me the settings

from cloudnative-pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.