Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?
Дата
Msg-id 23729.1354308479@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
BTW, on further inspection, there's yet another reason why we've not
heard about this from the field: even if all the wrong things happen and
GetTupleForTrigger manages to copy bogus data for the old tuple, that
data *is not passed to the trigger function*.  The only thing we do with
it is decide whether to queue an event for the trigger.  So if you've
got a WHEN condition for the trigger, that expression would see the bad
data, or if it's an RI trigger the bad data is passed to
RI_FKey_pk_upd_check_required or RI_FKey_fk_upd_check_required.  But
unless the data is corrupt enough to cause a crash, the worst outcome
would be a wrong decision about whether the trigger needs to be run.

It's possible this explains some of the reports we've seen about RI
constraints being violated.
        regards, tom lane



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Hot Standby Feedback should default to on in 9.3+
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: Hot Standby Feedback should default to on in 9.3+