Re: [HACKERS] Partitioning vs ON CONFLICT

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: [HACKERS] Partitioning vs ON CONFLICT
Дата
Msg-id 1213bbc3-e636-c624-c491-af9289126931@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] Partitioning vs ON CONFLICT  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: [HACKERS] Partitioning vs ON CONFLICT  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On 2017/02/17 1:17, Peter Geoghegan wrote:
> But surely it should be possible to use DO NOTHING without inferring some
> particular unique index? That's possible with an approach based on
> inheritance.

Hmm.  Code after the following comment fragment in ExecInsert():
            * Do a non-conclusive check for conflicts first.

would be working on a leaf partition chosen by tuple-routing after an
insert on a partitioned table.  The leaf partitions can very well have a
unique index, which can be used for inference.  The problem however is
that infer_arbiter_indexes() in the optimizer would be looking at the root
partitioned, which cannot yet have any indexes defined on them, let alone
unique indexes.  When we develop a feature where defining an index on the
root partitioned table would create the same index on all the leaf
partitions and then extend it to support unique indexes, then we can
perhaps talk about supporting ON CONFLICT handing.  Does that make sense?

Thanks,
Amit





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Implement custom join algorithm
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] Partitioning vs ON CONFLICT