Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table. - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.
Date
Msg-id CAD21AoAKx+FY4OPPj+MEF0gM-TAV0=fd3EfPoEsa+cMQLiWjyA@mail.gmail.com
Whole thread Raw
In response to Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.
Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.
List pgsql-hackers
On Tue, Jul 11, 2023 at 5:31 PM Peter Smith <smithpb2250@gmail.com> wrote:
>
> Here are my comments for v4.
>
> ======
>
> Docs/Comments:
>
> All the docs and updated comments LTGM, except I felt one sentence
> might be written differently to avoid nested parentheses.
>
> BEFORE
> ...used for REPLICA IDENTITY FULL table (see
> FindUsableIndexForReplicaIdentityFull() for details).
>
> AFTER
> ...used for REPLICA IDENTITY FULL table. See
> FindUsableIndexForReplicaIdentityFull() for details.
>
> ====

Agreed. I've attached the updated patch. I'll push it barring any objections.

>
> Logic:
>
> What was the decision about the earlier question [1] of
> removing/merging the function IsIndexOnlyOnExpression()?
>

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?

Regards,

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

Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: 'ERROR: attempted to update invisible tuple' from 'ALTER INDEX ... ATTACH PARTITION' on parent index
Next
From: "Wen Yi"
Date:
Subject: Re: [PATCH]Add a tip to the check mode