pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Amit Langote <amitlangote09@gmail.com>
To: Rafia Sabih <rafia.pghackers@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: adding partitioned tables to publications
Date: Wed, 8 Jan 2020 11:54:52 +0100
Message-ID: <825b31ea-ad9f-21d1-29b6-2a494513458d@2ndquadrant.com> (raw)
In-Reply-To: <CA+HiwqE2ie6_T01fMzsf7c5=hCGoVdj2yTStCJ78zOmayMVWbw@mail.gmail.com>
References: <CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_eJMOOznQ@mail.gmail.com>
	<CA+HiwqHf8_bcyHt=6R4O_Ju4P_Wz6wu1MkOAe14URdpdafS_KQ@mail.gmail.com>
	<CA+HiwqEQb5-26-=-K=vrWKQhvn7kqOfS-Vgj+H2YMw5XtdUUQw@mail.gmail.com>
	<eed6fb07-94d6-a2a5-33e1-84679dca9363@2ndquadrant.com>
	<CA+HiwqF7JD0CLkN12KNuGsf5GfaLuVb-Nc6+nTyL_iOhrSuA0g@mail.gmail.com>
	<CA+HiwqFWK3raKUU5Fp789jBsju-pYVpAiw0OsuO5sMX1CkYwFQ@mail.gmail.com>
	<b1e7d3c5-d4f8-2bc6-80a1-18b18c5db347@2ndquadrant.com>
	<CA+HiwqFwZV4F5sznWvgqf4eR6SebWLTq--gLVytNdtiCDMn=vg@mail.gmail.com>
	<7a23e60b-ffe8-bce1-5c44-db48d3bc163e@2ndquadrant.com>
	<CA+HiwqGZuouqjvWGv2MZ3EOyVej2_6Z=Yv2GHia4Mfk+YY_fHA@mail.gmail.com>
	<CA+HiwqGUZJYaJSM5cPKKFrFSJbTsDyJ9o4Vd=M2d7i5brKvGbA@mail.gmail.com>
	<b6d8519b-353f-1949-79b5-460a6712e20f@2ndquadrant.com>
	<CA+HiwqHScTtXD97yC_ZRLk7TXf+0HYH+UeDvACf2Q-LBH-2ctw@mail.gmail.com>
	<CA+FpmFfKmsNww_C5hWU-=wg9h3cyV7vZcCUKWrrhtLkteUtY4w@mail.gmail.com>
	<CA+HiwqE2ie6_T01fMzsf7c5=hCGoVdj2yTStCJ78zOmayMVWbw@mail.gmail.com>

On 2020-01-07 06:01, Amit Langote wrote:
> On Mon, Jan 6, 2020 at 8:25 PM Rafia Sabih <rafia.pghackers@gmail.com> wrote:
>> Hi Amit,
>>
>> I went through this patch set once again today and here are my two cents.
> 
> Thanks Rafia.
> 
> Rebased and updated to address your comments.

Looking through 0001, I think perhaps there is a better way to structure 
some of the API changes.

Instead of passing the root_target_rel to CheckValidResultRel() and 
CheckCmdReplicaIdentity(), which we only need to check the publication 
actions of the root table, how about changing 
GetRelationPublicationActions() to automatically include the publication 
information of the root table.  Then we have that information in the 
relcache once and don't need to check the base table and the partition 
root separately at each call site (of which there is only one right 
now).  (Would that work correctly with relcache invalidation?)

Similarly, couldn't GetRelationPublications() just automatically take 
partitioning into account?  We don't need the separation between 
GetRelationPublications() and GetRelationAncestorPublications().  This 
would also avoid errors of omission, for example the 
GetRelationPublications() call in ATPrepChangePersistence() doesn't take 
GetRelationAncestorPublications() into account.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (86+ messages)  latest in thread

Message-ID: <825b31ea-ad9f-21d1-29b6-2a494513458d@2ndquadrant.com>
Permalink:  ../825b31ea-ad9f-21d1-29b6-2a494513458d@2ndquadrant.com/
Also on:    postgresql.org/message-id/825b31ea-ad9f-21d1-29b6-2a494513458d@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, amitlangote09@gmail.com, rafia.pghackers@gmail.com
  Subject: Re: adding partitioned tables to publications
  In-Reply-To: <825b31ea-ad9f-21d1-29b6-2a494513458d@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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