Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS
Дата
Msg-id YKSSj5yQOg1twolW@paquier.xyz
обсуждение исходный текст
Ответ на Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Tue, May 18, 2021 at 11:46:25PM -0400, Tom Lane wrote:
> 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

Yeah, the first patch I wrote for this thread was pushing out
PopActiveSnapshot() into the finish() routine, but I really found the
creation of the ModifyTableState stuff needed for a partitioned table
done in create_estate_for_relation() to make the code more confusing,
as that's only a piece needed for the tuple routing path.  Saying
that, minimizing calls to PopActiveSnapshot() and PushActiveSnapshot()
is an improvement.  That's why I settled into more calls to
AfterTriggerEndQuery() in the 4 code paths of any apply (tuple routing
+ 3 DMLs).

> 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.

Didn't remember this one.  This reminds me of something similar I did
a couple of weeks ago for the worker code, similar to what you have
here.  Moving the snapshot push to be earlier, as your other patch is
doing, was bringing a bit more sanity when it came to opening the
indexes of the relation on which a change is applied as we need an
active snapshot for predicates and expressions (aka ExecOpenIndices
and ExecCloseIndices).
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: pg_get_wal_replay_pause_state() should not return 'paused' while a promotion is ongoing.