Skip to content

londiste - adding table partition to replication  #5

@zivzivko

Description

@zivzivko

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions