Re: Minimal logical decoding on standbys

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, fabriziomello(at)gmail(dot)com, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Rahila Syed <rahila(dot)syed(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Minimal logical decoding on standbys
Date: 2023-04-07 05:00:27
Message-ID: 5ae753a4-3f07-a6ed-36da-12a377cf00dc@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 4/7/23 4:18 AM, Andres Freund wrote:
> Hi,
>
> TBH, I don't like the state of 0001 much. I'm working on polishing it now.
>

Thanks Andres!

> A lot of the new functions in slot.h don't seem right to me:
> - ObsoleteSlotIsInvalid() - isn't an obsolete slot by definition invalid?

bad naming, agree.

> - Why does ObsoleteSlotIsInvalid() sometime check invalidated_at and sometimes
> not?

because part of the existing code was doing so (checking if s->data.restart_lsn is valid
with/without checking if data.invalidated_at is valid) and I thought it was better not
to change it.

> - TransactionIdIsValidPrecedesOrEquals() shouldn't be defined in slot.h -
> also, it's not actually clear what semantics it's trying to have.

Oh right, my bad for the location.

> - there's no commonality in naming between the functions used to test if a
> slot needs to be invalidated (SlotIsFreshEnough() vs
> LogicalSlotIsNotConflicting()).

Agree, my bad.

Regards,

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Drouvot, Bertrand 2023-04-07 05:02:04 Re: Minimal logical decoding on standbys
Previous Message Drouvot, Bertrand 2023-04-07 04:58:21 Re: Minimal logical decoding on standbys