public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bertrand Drouvot <[email protected]>
To: Amit Kapila <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation
Date: Fri, 15 Mar 2024 16:45:18 +0000
Message-ID: <ZfR7HuzFEswakt/[email protected]> (raw)
In-Reply-To: <CAA4eK1+02XhKht3EB=RgzQ=2zyb9Sv4=9iC=yt1j4FfVy0-5kg@mail.gmail.com>
References: <20240301221108.GB3024365@nathanxps13>
	<CALj2ACUprrvq=R9WBnCEtguBhSp0X+krTCGDvkHyBdawyex-kA@mail.gmail.com>
	<20240303214434.GA3036597@nathanxps13>
	<CAA4eK1+NUeb21bYa9K5mVsFHcw-xodGLkN9QoqJXym7sD3LtZA@mail.gmail.com>
	<CALj2ACVr8ra-yp8CwiBq=Pc9Kkq64z=zDvoFxMK3K4wSDhKMmg@mail.gmail.com>
	<CAA4eK1KxsMg4bnxRZ0U3dZ3irFoR2=TfUCOFig3ccHoRPp5iWg@mail.gmail.com>
	<CALj2ACU-sJdiLfAcWd+8hnt4HSojH0UWFGnaGr9gxb2bYzYYSA@mail.gmail.com>
	<CAA4eK1++=fOpmsQKugQQRtQr2wmiintjKEhpuOch9=phxirAfg@mail.gmail.com>
	<CALj2ACVd_dizYQiZwwUfsb+hG-fhGYo_kEDq0wn_vNwQvOrZHg@mail.gmail.com>
	<CAA4eK1+02XhKht3EB=RgzQ=2zyb9Sv4=9iC=yt1j4FfVy0-5kg@mail.gmail.com>

Hi,

On Thu, Mar 14, 2024 at 12:24:00PM +0530, Amit Kapila wrote:
> On Wed, Mar 13, 2024 at 9:24 PM Bharath Rupireddy
> <[email protected]> wrote:
> >
> > On Wed, Mar 13, 2024 at 9:21 AM Amit Kapila <[email protected]> wrote:
> > >
> > > > So, how about we turn conflict_reason to only report the reasons that
> > > > actually cause conflict with recovery for logical slots, something
> > > > like below, and then have invalidation_cause as a generic column for
> > > > all sorts of invalidation reasons for both logical and physical slots?
> > >
> > > If our above understanding is correct then coflict_reason will be a
> > > subset of invalidation_reason. If so, whatever way we arrange this
> > > information, there will be some sort of duplicity unless we just have
> > > one column 'invalidation_reason' and update the docs to interpret it
> > > correctly for conflicts.
> >
> > Yes, there will be some sort of duplicity if we emit conflict_reason
> > as a text field. However, I still think the better way is to turn
> > conflict_reason text to conflict boolean and set it to true only on
> > rows_removed and wal_level_insufficient invalidations. When conflict
> > boolean is true, one (including all the tests that we've added
> > recently) can look for invalidation_reason text field for the reason.
> > This sounds reasonable to me as opposed to we just mentioning in the
> > docs that "if invalidation_reason is rows_removed or
> > wal_level_insufficient it's the reason for conflict with recovery".
> >
> 
> Fair point. I think we can go either way. Bertrand, Nathan, and
> others, do you have an opinion on this matter?

Sounds like a good approach to me and one will be able to quickly identify
if a conflict occured.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com






view thread (18+ messages)  latest in thread

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]
  Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation
  In-Reply-To: <ZfR7HuzFEswakt/[email protected]>

* 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