Re: Needless additional partition check in INSERT?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Needless additional partition check in INSERT?
Дата
Msg-id 20180608184122.opplyrcgw74pjjsh@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Needless additional partition check in INSERT?  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: Needless additional partition check in INSERT?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Needless additional partition check in INSERT?  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
On 2018-Jun-09, David Rowley wrote:

> Of course, that could be fixed by adding something like "bool
> isinsert" to ExecConstraints(), so that it does not do the needless
> check on UPDATE,

Yeah, that was my actual suggestion rather than using Amit's patch
verbatim.

> but I'm strongly against the reduction in modularity.
> I quite like ExecConstraints() the way it is.

I see.

Maybe this business of sticking the partition constraint check in
ExecConstraints was a bad idea all along.  How about we rip it out and
move the responsibility of doing ExecPartitionCheck to the caller
instead?  See attached.  This whole business looks much cleaner to me
this way.


BTW, while working on this, I was a bit disturbed by the
execReplication.c changes (namely: if the partitioning is not identical
on both sides, things are likely to blow up pretty badly), but that's a
separate topic.  I didn't see any tests of logical replication with
partitioned tables ... Is the current understanding that we don't
promise those things to work terribly well together?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Needless additional partition check in INSERT?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pl/tcl function to detect when a request has been canceled