Re: [BUG] Unexpected action when publishing partition tables

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Subject: Re: [BUG] Unexpected action when publishing partition tables
Date: 2021-10-18 06:56:15
Message-ID: CAA4eK1LqYupNtNfB1hic7bktXEMS68APMmKg7Ffurgtc5PnD6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 18, 2021 at 12:24 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Wed, Oct 13, 2021 at 9:11 AM Amit Langote <amitlangote09(at)gmail(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2021-10-18 07:28:57 Re: Partition Check not updated when insert into a partition
Previous Message Amit Kapila 2021-10-18 06:54:27 Re: [BUG] Unexpected action when publishing partition tables