Re: [HACKERS] BEFORE trigger can cause undetected partitionconstraint violation

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: [HACKERS] BEFORE trigger can cause undetected partitionconstraint violation
Дата
Msg-id b8fb90d4-b369-31b2-5628-3a099fad739d@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] BEFORE trigger can cause undetected partitionconstraint violation  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] BEFORE trigger can cause undetected partitionconstraint violation  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2017/06/03 1:56, Robert Haas wrote:
> On Fri, Jun 2, 2017 at 12:51 AM, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> Attached patch makes InitResultRelInfo() *always* initialize the
>> partition's constraint, that is, regardless of whether insert/copy is
>> through the parent or directly on the partition.  I'm wondering if
>> ExecInsert() and CopyFrom() should check if it actually needs to execute
>> the constraint?  I mean it's needed if there exists BR insert triggers
>> which may change the row, but not otherwise.  The patch currently does not
>> implement that check.
> 
> I think it should.  I mean, otherwise we're leaving a
> probably-material amount of performance on the table.

I agree.  Updated the patch to implement the check.

Thanks,
Amit

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Jing Wang
Дата:
Сообщение: Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] proposal psql \gdesc