Re: adding partitioned tables to publications

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(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-03 14:25:02
Message-ID: CA+HiwqGkknVb+ccLVkgw1DoBYPzpuR43L+aT1eOT8dVEtiedtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 3, 2020 at 6:34 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> I am checking test coverage at the moment and should have the patches
> ready by sometime later today.

Attached updated patches.

I confirmed using a coverage build that all the new code in
logical/worker.c due to 0002 is now covered. For some reason, coverage
report for pgoutput.c doesn't say the same thing for 0003's changes,
although I doubt that result. It seems strange to believe that *none*
of the new code is tested. I even checked by adding debugging elog()s
next to the lines that the coverage report says aren't exercised,
which tell me that that's not true. Perhaps my coverage build is
somehow getting messed up, so it would be nice if someone with
reliable coverage builds can confirm one way or the other. I will
continue to check what's wrong.

I fixed a couple of bugs in 0002. One of the bugs was that the
"partition map" hash table in logical/relation.c didn't really work,
so logicalrep_partition_would() always create a new entry.

In 0003, changed the publication parameter name to publish_via_partition_root.

--
Thank you,

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

Attachment Content-Type Size
v16-0001-Add-subscription-support-to-replicate-into-parti.patch application/octet-stream 29.3 KB
v16-0002-Publish-partitioned-table-inserts-as-its-own.patch application/octet-stream 58.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexey Kondratov 2020-04-03 14:29:45 Re: [HACKERS] make async slave to wait for lsn to be replayed
Previous Message Robert Haas 2020-04-03 14:19:21 where should I stick that backup?