Re: adding partitioned tables to publications

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Petr Jelinek <petr(at)2ndquadrant(dot)com>, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: adding partitioned tables to publications
Date: 2020-04-08 05:45:54
Message-ID: CA+HiwqEThKQh6bPOj68fqUO3s+PRBdUeAfe5GGDgoYdU_fb2Sw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 8, 2020 at 1:22 AM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> On Tue, Apr 7, 2020 at 6:01 PM Peter Eisentraut
> <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> > The descriptions of the new fields in RelationSyncEntry don't seem to
> > match the code accurately, or at least it's confusing.
> > replicate_as_relid is always filled in with an ancestor, even if
> > pubviaroot is not set.
>
> Given this confusion, I have changed how replicate_as_relid works so
> that it's now always set -- if different from the relation's own OID,
> the code for "publishing via root" kicks in in various places.
>
> > I think the pubviaroot field is actually not necessary. We only need
> > replicate_as_relid.
>
> Looking through the code, I agree. I guess I only kept it around to
> go with pubupdate, etc.

Think I broke truncate replication with this. Fixed in the attached
updated patch.

--

Amit Langote
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v20-0001-Allow-publishing-partition-changes-via-ancestors.patch application/octet-stream 57.3 KB
v19-v20-delta.patch application/octet-stream 1.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rajkumar Raghuwanshi 2020-04-08 05:48:31 Re: WIP/PoC for parallel backup
Previous Message Amit Kapila 2020-04-08 05:43:57 Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch)