Re: Skip partition tuple routing with constant partition key

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: Skip partition tuple routing with constant partition key
Дата
Msg-id CA+HiwqH86BSZ7mKzqBGX9P0AN1LAoDj=cVwbKm5E0yoaU0FcMw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Skip partition tuple routing with constant partition key  (Amit Langote <amitlangote09@gmail.com>)
Ответы RE: Skip partition tuple routing with constant partition key  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Список pgsql-hackers
On Fri, Jun 4, 2021 at 6:05 PM Amit Langote <amitlangote09@gmail.com> wrote:
> On Fri, Jun 4, 2021 at 4:38 PM Amit Langote <amitlangote09@gmail.com> wrote:
> > On Thu, Jun 3, 2021 at 8:48 PM Amit Langote <amitlangote09@gmail.com> wrote:
> > > On Tue, Jun 1, 2021 at 5:43 PM houzj.fnst@fujitsu.com
> > > <houzj.fnst@fujitsu.com> wrote:
> > > > So, If we want to share the cached partition between statements, we seems cannot
> > > > use ExecPartitionCheck. Instead, I tried directly invoke the partition support
> > > > function(partsupfunc) to check If the cached info is correct. In this approach I
> > > > tried cache the *bound offset* in PartitionDescData, and we can use the bound offset
> > > > to get the bound datum from PartitionBoundInfoData and invoke the partsupfunc
> > > > to do the CHECK.
> > > >
> > > > Attach a POC patch about it. Just to share an idea about sharing cached partition info
> > > > between statements.
> > >
> > > I have not looked at your patch yet, but yeah that's what I would
> > > imagine doing it.
> >
> > Just read it and think it looks promising.
> >
> > On code, I wonder why not add the rechecking-cached-offset code
> > directly in get_partiiton_for_tuple(), instead of adding a whole new
> > function for that.  Can you please check the attached revised version?

I should have clarified a bit more on why I think a new function
looked unnecessary to me.  The thing about that function that bothered
me was that it appeared to duplicate a lot of code fragments of
get_partition_for_tuple().  That kind of duplication often leads to
bugs of omission later if something from either function needs to
change.

-- 
Amit Langote
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Are we missing (void) when return value of fsm_set_and_search is ignored?
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: postgres_fdw batching vs. (re)creating the tuple slots