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

londiste - adding table partition to replication #5

Open
zivzivko opened this issue Sep 8, 2022 · 0 comments
Open

londiste - adding table partition to replication #5

zivzivko opened this issue Sep 8, 2022 · 0 comments

Comments

@zivzivko
Copy link

zivzivko commented Sep 8, 2022

Hello,

Partitioned table stats_replicate.wb_ads_blocks is being partitioned using partman (declarative partioning, PARTITION BY RANGE ).
I am trying to add table partitions to replication like this:
londiste skytools_devel.ini add-table stats_replicate.wb_ads_blocks_default

Table partition is added but merge_state than states as in-copy and there is an error on leaf node:
LOG: statement: ALTER TABLE ONLY stats_replicate.wb_ads_blocks_default NO INHERIT stats_replicate.wb_ads_blocks
ERROR: cannot change inheritance of a partition

This check returns parent table and than follows alter table only no inherit :

SELECT n.nspname||'.'||c.relname AS name
FROM pg_inherits i
JOIN pg_class c ON i.inhparent = c.oid
JOIN pg_namespace n ON c.relnamespace = n.oid
WHERE i.inhrelid = 33073131

But, it seems that this check works the same for declarative partitioning as for partitioning using inheritance.

Version being used:
londiste, Skytools version 3.6.1

Could you, please, advise if there is workaround to use it like in this case?

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

No branches or pull requests

1 participant