Re: [BUG] Unexpected action when publishing partition tables

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>, vignesh C <vignesh21@gmail.com>, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Date: 2021-10-18T06:56:15Z
Lists: pgsql-hackers
On Mon, Oct 18, 2021 at 12:24 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Wed, Oct 13, 2021 at 9:11 AM Amit Langote <amitlangote09@gmail.com> wrote:
> > Anyway, I'll think a bit more about the possible hazards of not doing
> > the locking and will reply again if there's indeed a problem(s) that
> > needs to be fixed.
> >
>
> I think you can try to reproduce the problem via the debugger. You can
> stop before calling GetPubPartitionOptionRelations in
> publication_add_relation()  in session-1 and then from another session
> (say session-2) try to delete one of the partition table (without
> replica identity).  Then stop in session-2 somewhere after acquiring
> lock to the corresponding partition relation. Now, continue in
> session-1 and invalidate the rels and let it complete the command. I
> think session-2 will complete the update without processing the
> invalidations.
>

In the last sentence, it should be delete rather than update.

-- 
With Regards,
Amit Kapila.



Commits

  1. Invalidate all partitions for a partitioned table in publication.