Re: Skip partition tuple routing with constant partition key - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Skip partition tuple routing with constant partition key
Date
Msg-id CA+HiwqF0qYf4gjMjTnFx_oNDMJ7z8o3SjSSnCEdbBLNEF_0MgQ@mail.gmail.com
Whole thread Raw
In response to Re: Skip partition tuple routing with constant partition key  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: Skip partition tuple routing with constant partition key
List pgsql-hackers
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?

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

Attachment

pgsql-hackers by date:

Previous
From: Greg Nancarrow
Date:
Subject: Re: pg_stat_progress_create_index vs. parallel index builds
Next
From: Dilip Kumar
Date:
Subject: Re: Race condition in recovery?