Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.
Date: 2023-07-13 05:25:15
Message-ID: CAD21AoAs-UeuUX1nY2md+n8=vDpbGKoXWv0PQiF2388wYi=bwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 12, 2023 at 11:15 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Wed, Jul 12, 2023 at 7:08 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Wed, Jul 12, 2023 at 12:31 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > >
> > > On Tue, Jul 11, 2023 at 5:31 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> > > >
> > >
> > > I don't think we have concluded any action for it. I agree that
> > > IsIndexOnlyOnExpression() is redundant. We don't need to check *all*
> > > index fields actually. I've attached a draft patch. It removes
> > > IsIndexOnlyOnExpression() and merges
> > > RemoteRelContainsLeftMostColumnOnIdx() to
> > > FindUsableIndexForReplicaIdentityFull. One concern is that we no
> > > longer do the assertion check with
> > > IsIndexUsableForReplicaIdentityFull(). What do you think?
> > >
> >
> > I think this is a valid concern. Can't we move all the checks
> > (including the remote attrs check) inside
> > IsIndexUsableForReplicaIdentityFull() and then call it from both
> > places? Won't we have attrmap information available in the callers of
> > FindReplTupleInLocalRel() via ApplyExecutionData?
>
> You mean to pass ApplyExecutionData or attrmap down to
> RelationFindReplTupleByIndex()? I think it would be better to call it
> from FindReplTupleInLocalRel() instead.

I've attached a draft patch for this idea.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
remove_redundant_check_v2.patch application/octet-stream 10.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-07-13 05:26:42 Re: 'ERROR: attempted to update invisible tuple' from 'ALTER INDEX ... ATTACH PARTITION' on parent index
Previous Message David Rowley 2023-07-13 05:03:50 Re: Changing types of block and chunk sizes in memory contexts