Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher - Mailing list pgsql-hackers

From Önder Kalacı
Subject Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Date
Msg-id CACawEhVk9_eSfbyEB-ej2N4FH2ZS7zc4mwXRGQWxA5LbKD+xww@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher  (Peter Smith <smithpb2250@gmail.com>)
RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher  (Peter Smith <smithpb2250@gmail.com>)
Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher  (Amit Kapila <amit.kapila16@gmail.com>)
Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher  (vignesh C <vignesh21@gmail.com>)
RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
List pgsql-hackers
Hi,


 Is it just a matter of testing other
index types 

Yes, there are more to it. build_replindex_scan_key()
only works for btree indexes, as it does BTEqualStrategyNumber.

I might expect a few more limitations like that. I added comment
in the code (see FindUsableIndexForReplicaIdentityFull)

or there is something more to it, if so, we should add
comments so that they can be supported in the future if it is feasible
to do so.

I really don't see any fundamental issues regarding expanding the
support for more index types, it is just some more coding & testing.

And, I can (and willing to) work on that as a follow-up. I explicitly
try to keep this patch as small as possible.
 
>
> Attached are both patches: the main patch, and the patch that
> optionally disables the index scans.
>

Both the patches are numbered 0001. It would be better to number them
as 0001 and 0002.


Alright, attached v27_0001_use_index_on_subs_when_pub_rep_ident_full.patch and 
v27_0002_use_index_on_subs_when_pub_rep_ident_full.patch.

I also added one more test which Andres asked me on a private chat
(Testcase start: SUBSCRIPTION USES INDEX WITH PUB/SUB different data).

Thanks,
Onder
Attachment

pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Next
From: Kuntal Ghosh
Date:
Subject: Re: Allow logical replication to copy tables in binary format