pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Allow publishing partition changes via ancestors
3+ messages / 3 participants
[nested] [flat]
* pgsql: Allow publishing partition changes via ancestors
@ 2020-04-08 09:23 Peter Eisentraut <peter@eisentraut.org>
0 siblings, 1 reply; 3+ messages in thread
From: Peter Eisentraut @ 2020-04-08 09:23 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Allow publishing partition changes via ancestors
To control whether partition changes are replicated using their own
identity and schema or an ancestor's, add a new parameter that can be
set per publication named 'publish_via_partition_root'.
This allows replicating a partitioned table into a different partition
structure on the subscriber.
Author: Amit Langote <amitlangote09@gmail.com>
Reviewed-by: Rafia Sabih <rafia.pghackers@gmail.com>
Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Reviewed-by: Petr Jelinek <petr@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_eJMOOznQ@mail....
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/83fd4532a72179c370e318075a10e0e2aa832024
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 10 +
doc/src/sgml/logical-replication.sgml | 12 +-
doc/src/sgml/ref/create_publication.sgml | 20 ++
src/backend/catalog/pg_publication.c | 70 +++----
src/backend/commands/publicationcmds.c | 95 +++++----
src/backend/replication/pgoutput/pgoutput.c | 223 +++++++++++++++++----
src/backend/utils/cache/relcache.c | 15 ++
src/bin/pg_dump/pg_dump.c | 24 ++-
src/bin/pg_dump/pg_dump.h | 1 +
src/bin/psql/describe.c | 17 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_publication.h | 5 +-
src/test/regress/expected/publication.out | 103 +++++-----
src/test/regress/sql/publication.sql | 3 +
src/test/subscription/t/013_partition.pl | 298 +++++++++++++++++++++++++++-
15 files changed, 724 insertions(+), 174 deletions(-)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Allow publishing partition changes via ancestors
@ 2020-04-09 12:42 Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
parent: Peter Eisentraut <peter@eisentraut.org>
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Dunstan @ 2020-04-09 12:42 UTC (permalink / raw)
To: Peter Eisentraut <peter@eisentraut.org>; pgsql-committers@lists.postgresql.org
On 4/8/20 5:23 AM, Peter Eisentraut wrote:
> Allow publishing partition changes via ancestors
>
> To control whether partition changes are replicated using their own
> identity and schema or an ancestor's, add a new parameter that can be
> set per publication named 'publish_via_partition_root'.
>
> This allows replicating a partitioned table into a different partition
> structure on the subscriber.
prion seems to be persistently unhappy with this. It uses
-DRELCACHE_FORCE_RELEASE -DCATCACHE_FORCE_RELEASE, not sure if this
could affect the result.
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Allow publishing partition changes via ancestors
@ 2020-04-09 13:07 Amit Langote <amitlangote09@gmail.com>
parent: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
0 siblings, 0 replies; 3+ messages in thread
From: Amit Langote @ 2020-04-09 13:07 UTC (permalink / raw)
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>; +Cc: Peter Eisentraut <peter@eisentraut.org>; pgsql-committers@lists.postgresql.org
On Thu, Apr 9, 2020 at 9:42 PM Andrew Dunstan
<andrew.dunstan@2ndquadrant.com> wrote:
> On 4/8/20 5:23 AM, Peter Eisentraut wrote:
> > Allow publishing partition changes via ancestors
> >
> > To control whether partition changes are replicated using their own
> > identity and schema or an ancestor's, add a new parameter that can be
> > set per publication named 'publish_via_partition_root'.
> >
> > This allows replicating a partitioned table into a different partition
> > structure on the subscriber.
>
> prion seems to be persistently unhappy with this. It uses
> -DRELCACHE_FORCE_RELEASE -DCATCACHE_FORCE_RELEASE, not sure if this
> could affect the result.
Patch to fix that has been posted on the -hackers thread:
https://www.postgresql.org/message-id/04d78603-edae-9243-9dde-fe3037176a7d%402ndquadrant.com
--
Amit Langote
EnterpriseDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-04-09 13:07 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 09:23 pgsql: Allow publishing partition changes via ancestors Peter Eisentraut <peter@eisentraut.org>
2020-04-09 12:42 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
2020-04-09 13:07 ` Amit Langote <amitlangote09@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox