Re: [HACKERS] Placement of InvokeObjectPostAlterHook calls

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Placement of InvokeObjectPostAlterHook calls
Дата
Msg-id 20921.1484072833@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Placement of InvokeObjectPostAlterHook calls  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Jan 6, 2017 at 12:53 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> While reviewing Etsuro-san's patch to force replanning after FDW option
>> changes, I noticed that there is a great lack of consistency about where
>> InvokeObjectPostAlterHook calls have been placed relative to other actions
>> such as forced relcache invals.

> I remember working pretty hard to make this consistent when that code
> went in.  In particular, I think the rule I tried to follow was to
> place the hooks just after the code that injects dependencies.  I
> don't know whether the inconsistencies you're seeing are due to (1)
> that being a poor rule of thumb, (2) that rule of thumb not being
> consistently followed at the time the original patch was committed, or
> (3) subsequent drift.

Well, what I was concerned about was specifically placement relative
to cache-invalidation calls.  But on reflection it may not matter, since
those really don't do anything except queue up actions to be taken at the
next CommandCounterIncrement boundary.  If we allowed the PostAlterHook
functions to do a CommandCounterIncrement then it would be problematic,
but I since found some comments indicating that they shouldn't do that.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] RustgreSQL
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] pageinspect: Hash index support