Re: [HACKERS] UPDATE of partition key

Поиск
Список
Период
Сортировка
От Amit Khandekar
Тема Re: [HACKERS] UPDATE of partition key
Дата
Msg-id CAJ3gD9cpyM1L0vTrXzrggR=t6MSZtuy_kge1kagMBi0TSKa_UQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] UPDATE of partition key  (Amit Khandekar <amitdkhan.pg@gmail.com>)
Ответы Re: [HACKERS] UPDATE of partition key  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 16 January 2018 at 16:09, Amit Khandekar <amitdkhan.pg@gmail.com> wrote:
> I have now embedded the above incremental patch changes into the main
> patch (v37) , which is attached.

The patch had to be rebased over commit dca48d145e0e :
    Remove useless lookup of root partitioned rel in ExecInitModifyTable().

In ExecInitModifyTable(), "rel" variable was needed only for INSERT.
And node->partitioned_rels is only set in UPDATE/DELETE cases, so the
extra logic of getting the root partitioned rel from
node->partitioned_rels was removed as part of that commit.

But now for update-tuple-routing, we require rel for UPDATE also. So
we need to get the root partitioned rel. But, rather than opening the
root table from node->partitioned_rels, we can re-use the
already-opened mtstate->rootResultInfo. rootResultInfo is the same as
head of partitioned_rels. I have renamed getASTriggerResultRelInfo()
to getTargetResultRelInfo(), and used it to get the root partitioned
table. The rename made sense, because it has become a function for
more general use, rather than specific to triggers-related
functionality.

Attached rebased patch.




-- 
Thanks,
-Amit Khandekar
EnterpriseDB Corporation
The Postgres Database Company

Вложения

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [Sender Address Forgery]Re: pg_(total_)relation_size andpartitioned tables
Следующее
От: Emre Hasegeli
Дата:
Сообщение: Re: [HACKERS] [PATCH] Improve geometric types