public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dilip Kumar <[email protected]>
To: Amit Kapila <[email protected]>
Cc: Önder Kalacı <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Marco Slot <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Date: Mon, 6 Mar 2023 19:25:37 +0530
Message-ID: <CAFiTN-vjFKTB7uWSkC0_J1NkfwyaFz+6TzW9bf2GS1XM7YSQ8g@mail.gmail.com> (raw)
In-Reply-To: <CAA4eK1Lt8MCEpwbgq623ySaquz5sNoMk1SVAQ8XN-QDxRa5E9A@mail.gmail.com>
References: <OSZPR01MB63105BD4B03B3C1FBFCC7E6CFD249@OSZPR01MB6310.jpnprd01.prod.outlook.com>
	<CACawEhWdoiaXwKjn5ZfAKF_Toz=t1aqT1ewHmJLRnXmKOQKwyg@mail.gmail.com>
	<OS3PR01MB62754E945BD95A9B2A1164789E289@OS3PR01MB6275.jpnprd01.prod.outlook.com>
	<CACawEhXBtt9aMoU0j6funj-s+CW+e8HMFCGz30gyEwLazXB_1w@mail.gmail.com>
	<OSZPR01MB63109FF52120649EECACC7AEFD2A9@OSZPR01MB6310.jpnprd01.prod.outlook.com>
	<CACawEhUUHcSVhp-bODSAnYNUQHY=4gvY29DXM=yuphgrkcqqmQ@mail.gmail.com>
	<CACawEhX6TvX+j8EpcpCKvnMGao8Gcp8W43Sgc87pg9o6-Xbf2Q@mail.gmail.com>
	<[email protected]>
	<CACawEhV68Ry7BGJV150xsUskJPa88rpOf3zo_OcA_MpSWGQobQ@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAFMSG9E7_JgnaBj1f_jU4dEmOnL=K6UyBAPR7eZ0NukUcR2L9g@mail.gmail.com>
	<CACawEhUxEfVr64ywC0sj7nDwFg=vR30qehNoqSDcx6VV2=B_Lw@mail.gmail.com>
	<CAA4eK1L6P8hM+17fNyWogSnueTJebvZUX7YseL54HSFpX_0m_A@mail.gmail.com>
	<CACawEhUN=+vjY0+4q416-rAYx6pw-nZMHQYsJZCftf9MjoPN3w@mail.gmail.com>
	<CAA4eK1LhQWmFDvFHpO6yR-E4iL4ekUuSRwTw44dH9rMvpdu_hA@mail.gmail.com>
	<OSZPR01MB63103A4AFBBA56BAF8AE7FAAFDA39@OSZPR01MB6310.jpnprd01.prod.outlook.com>
	<CAA4eK1JOq0_r=LwYcqZ+8wufyg9NAeJBSCPbavmGES512pOeAQ@mail.gmail.com>
	<CACawEhV8X88dDxL+LYs9X=qGh+en1nVjNSevXcQPVuSnN+d2Pg@mail.gmail.com>
	<CACawEhUU8MgaCCLeLmcZe_XkOYnLEg9myWbsRZTogp_R8Jx02Q@mail.gmail.com>
	<CAA4eK1LRqn=-X2rDS4T_-UyiwdEnfSjz+2qRLoBJ6sMTaYga3A@mail.gmail.com>
	<CACawEhUQjxYU=UAamdnfaJU0uGJFXzhxrOT-km343kZYpeCGfw@mail.gmail.com>
	<CAA4eK1LPVqhuUkbHbCXDuQAvCvLA_qeCmg3WkOA3ZKBx1sh8dQ@mail.gmail.com>
	<CACawEhVk9_eSfbyEB-ej2N4FH2ZS7zc4mwXRGQWxA5LbKD+xww@mail.gmail.com>
	<OS0PR01MB5716BE4954A99EAF14F4D1F294B39@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<CACawEhVFE4rsNyTtQxHSshUiWE=hF-ukDfVEZBM8jSkqukgiQw@mail.gmail.com>
	<CAA4eK1+JhdJQerz0x2yx=ecbKng2q0=5QYk51=QXA-Do0Tuvkg@mail.gmail.com>
	<CACawEhUG9yg3DS+MD=Y2RL--LXUJHh=stfodZ7SVxY0-MXOqpA@mail.gmail.com>
	<CAFiTN-vcxzzZNFyPmYgF5-iNErcivDo-kes7LdL0KmfKZ0p3bA@mail.gmail.com>
	<CAA4eK1Lt8MCEpwbgq623ySaquz5sNoMk1SVAQ8XN-QDxRa5E9A@mail.gmail.com>

On Mon, Mar 6, 2023 at 4:45 PM Amit Kapila <[email protected]> wrote:
>
> On Mon, Mar 6, 2023 at 4:18 PM Dilip Kumar <[email protected]> wrote:
> >
> > On Mon, Mar 6, 2023 at 2:38 PM Önder Kalacı <[email protected]> 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






view thread (6+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
  In-Reply-To: <CAFiTN-vjFKTB7uWSkC0_J1NkfwyaFz+6TzW9bf2GS1XM7YSQ8g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox