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

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] BEFORE trigger can cause undetected partitionconstraint violation
Дата
Msg-id CA+TgmoYO3iaLhjiFydauug+zzHu=q=_v8viW68=7_7sRXu_VBw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] BEFORE trigger can cause undetected partitionconstraint violation  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: [HACKERS] BEFORE trigger can cause undetected partitionconstraint violation  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
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.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] TAP: allow overriding PostgresNode in get_new_node
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Questions about upgrade standby with rsync