From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS
Date: Tue, 18 May 2021 23:46:25 -0400
Message-ID: <3392911.1621395985@sss.pgh.pa.us> (raw)
In-Reply-To: <YKSAFhtltIr9GUEi@paquier.xyz>
References: <3382681.1621381328@sss.pgh.pa.us>
<YKSAFhtltIr9GUEi@paquier.xyz>
Michael Paquier <michael@paquier.xyz> writes:
> On Tue, May 18, 2021 at 07:42:08PM -0400, Tom Lane wrote:
>> This might go away if worker.c weren't so creatively different
>> from the other code paths concerned with executor shutdown.
> The tuple routing has made the whole worker logic messier by a larger
> degree compared to when this stuff was only able to apply DMLs changes
> on the partition leaves. I know that it is not that great to be more
> creative here, but we need to make sure that AfterTriggerEndQuery() is
> moved before ExecCleanupTupleRouting(). We could either keep the
> ExecCleanupTupleRouting() calls as they are now, and call
> AfterTriggerEndQuery() in more code paths. Or we could have one
> PartitionTupleRouting and one ModifyTableState created beforehand
> in create_estate_for_relation() if applying the change on a
> partitioned table but that means manipulating more structures across
> more layers of this code. Something like the attached fixes the
> problem for me, but honestly it does not help in clarifying this code
> more.
I was wondering if we could move the ExecCleanupTupleRouting call
into finish_estate. copyfrom.c, for example, does that during
its shutdown function. Compare also the worker.c changes proposed
in
https://www.postgresql.org/message-id/3362608.1621367104%40sss.pgh.pa.us
which are because I discovered it's unsafe to pop the snapshot
before running AfterTriggerEndQuery.
regards, tom lane
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: tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
Subject: Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS
In-Reply-To: <3392911.1621395985@sss.pgh.pa.us>
* 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