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

From Amit Kapila
Subject Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Date
Msg-id CAA4eK1Lt8MCEpwbgq623ySaquz5sNoMk1SVAQ8XN-QDxRa5E9A@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher  (Dilip Kumar <dilipbalaut@gmail.com>)
Responses Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-hackers
On Mon, Mar 6, 2023 at 4:18 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
> On Mon, Mar 6, 2023 at 2:38 PM Önder Kalacı <onderkalaci@gmail.com> wrote:
> >
> I was going through the thread and patch,  I noticed that in the
> initial version, we were depending upon the planner to let it decide
> whether index scan is cheaper or not and which index to pick.  But in
> the latest patch if a useful index exists then we chose that without
> comparing the cost of whether it is cheaper than sequential scan or
> not.  Is my understanding correct?  What is the reason for the same,
>

Yes, your understanding is correct. The main reason is that we don't
have an agreement on using the internal planner APIs for apply. That
will be a long-term maintenance burden. See discussion around email
[1]. So, we decided to use the current infrastructure to achieve index
scans during apply when publisher has replica identity full. This will
still be win in many cases and we are planning to provide a knob to
disable this feature.

[1] - https://www.postgresql.org/message-id/3466340.1673117404%40sss.pgh.pa.us

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Dag Lem
Date:
Subject: Re: daitch_mokotoff module
Next
From: Önder Kalacı
Date:
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher