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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: 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-04 09:51:35
Message-ID: CAA4eK1LZ_A-UmC_P+_hLi+Pbwyqak+vRKemZ7imzk2puVTpHOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 3, 2023 at 7:45 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> Commit 89e46da5e5 allowed us to use indexes for searching on REPLICA
> IDENTITY FULL tables. The documentation explains:
>
> When replica identity <quote>full</quote> is specified,
> indexes can be used on the subscriber side for searching the rows. Candidate
> indexes must be btree, non-partial, and have at least one column reference
> (i.e. cannot consist of only expressions).
>
> To be exact, IIUC the column reference must be on the leftmost column
> of indexes. Does it make sense to mention that?
>

Yeah, I think it is good to mention that. Accordingly, the comments
atop build_replindex_scan_key(),
FindUsableIndexForReplicaIdentityFull(), IsIndexOnlyOnExpression()
should also be adjusted.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2023-07-04 10:02:37 Re: Add 64-bit XIDs into PostgreSQL 15
Previous Message Japin Li 2023-07-04 09:45:47 Re: Extension Enhancement: Buffer Invalidation in pg_buffercache