Re: Catalog_xmin is not advanced when a logical slot is lost

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: sirisha chamarthi <sirichamarthi22(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Subject: Re: Catalog_xmin is not advanced when a logical slot is lost
Date: 2022-11-22 10:01:08
Message-ID: 20221122100108.5oh2fysbrwg3r6hi@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-Nov-21, sirisha chamarthi wrote:

> On Mon, Nov 21, 2022 at 10:56 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
> wrote:

> > Instead I'm going to do what Ashutosh mentioned at the start, which is
> > to verify both the restart_lsn and the invalidated_at, when deciding
> > whether to ignore the slot.
>
> Sounds good to me. Thanks!

Done now. I also a new elog(DEBUG1), which I think makes the issue a
bit easier notice.

I think it would be even better if we reset the underlying data from
effective_catalog_xmin ... even with this patch, we show a non-zero
value for a slot in status "lost" (and we ignore it when computing the
overall xmin), which I think is quite confusing. But we can do that in
master only.

Thanks for reporting this issue.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message igor levshin 2022-11-22 10:09:29 Re: allowing for control over SET ROLE
Previous Message gkokolatos 2022-11-22 10:00:47 Re: Add LZ4 compression in pg_dump