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

Masahiko Sawada <sawada.mshk@gmail.com>

From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Peter Smith <smithpb2250@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-07-07T08:05:40Z
Lists: pgsql-hackers

Attachments

On Fri, Jul 7, 2023 at 10:55 AM Peter Smith <smithpb2250@gmail.com> wrote:
>
> Hi, Here are my review comments for patch v2.
>
> ======
> 1. doc/src/sgml/logical-replication.sgml
>
> Candidate indexes must be btree, non-partial, and have at least one
> column reference to the published table column at the leftmost column
> (i.e. cannot consist of only expressions).
>
> ~
>
> There is only one column which can be the leftmost one, so the wording
> "At least one ... at the leftmost"  seemed a bit strange to me.
> Personally, I would phrase it something like below:
>
> SUGGESTION #1
> Candidate indexes must be btree, non-partial, and the leftmost index
> column must reference a published table column (i.e. the index cannot
> consist of only expressions).

I prefer the first suggestion. I've attached the updated patch.

Regards,

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

Commits

  1. Remove unnecessary checks for indexes for REPLICA IDENTITY FULL tables.

  2. Allow the use of a hash index on the subscriber during replication.

  3. Doc: clarify the conditions of usable indexes for REPLICA IDENTITY FULL tables.

  4. Allow the use of indexes other than PK and REPLICA IDENTITY on the subscriber.