From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Önder Kalacı <onderkalaci(at)gmail(dot)com>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com>, Marco Slot <marco(dot)slot(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher |
Date: | 2023-03-06 13:55:37 |
Message-ID: | CAFiTN-vjFKTB7uWSkC0_J1NkfwyaFz+6TzW9bf2GS1XM7YSQ8g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 6, 2023 at 4:45 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Mon, Mar 6, 2023 at 4:18 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> >
> > On Mon, Mar 6, 2023 at 2:38 PM Önder Kalacı <onderkalaci(at)gmail(dot)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
Okay, this makes sense, so basically, in "replica identify full" case
instead of doing the default sequence scan we will provide a knob to
either choose index scan or sequence scan, and that seems reasonable
to me.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2023-03-06 14:03:38 | Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) |
Previous Message | Nazir Bilal Yavuz | 2023-03-06 13:47:03 | Re: meson: Optionally disable installation of test modules |