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

[MaterializedPostgreSQL] Possibly conflicting publications when using more CHDBs with one PG #45891

Closed
simPod opened this issue Feb 1, 2023 · 1 comment
Assignees
Labels
experimental feature Bug in the feature that should not be used in production

Comments

@simPod
Copy link
Contributor

simPod commented Feb 1, 2023

I have inspected publications in my PG that were created after running

CREATE DATABASE dbname ENGINE = MaterializedPostgreSQL
select * from pg_publication;

The publication with name dbname_ch_publication was created.


Now consider a ClickHouse instance A

CREATE DATABASE dbname ENGINE = MaterializedPostgreSQL(...)
        SETTINGS
            materialized_postgresql_tables_list = 'table_a';

Publication dbname_ch_publication is created and using select * from pg_publication_tables; we can see table_a listed there.


Now consider a ClickHouse instance B

CREATE DATABASE dbname ENGINE = MaterializedPostgreSQL(...)
        SETTINGS
            materialized_postgresql_tables_list = 'table_b';

Publication dbname_ch_publication is created and using select * from pg_publication_tables; we can see table_b listed there.

My point is that table_a got removed from the publication that was created by clickhouse A.

@simPod simPod added the potential bug To be reviewed by developers and confirmed/rejected. label Feb 1, 2023
@kssenii kssenii self-assigned this Feb 1, 2023
@alexey-milovidov alexey-milovidov added experimental feature Bug in the feature that should not be used in production and removed potential bug To be reviewed by developers and confirmed/rejected. labels Apr 2, 2023
@kssenii
Copy link
Member

kssenii commented Dec 6, 2023

This was fixed in #55145.
You need to create a database with setting materialized_postgresql_use_unique_replication_consumer_identifier=1.

@kssenii kssenii closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental feature Bug in the feature that should not be used in production
Projects
None yet
Development

No branches or pull requests

3 participants