Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae

From: Bowen Shi <zxwsbg12138(at)gmail(dot)com>
To: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Alexander Lakhin <exclusion(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae
Date: 2024-05-28 09:03:37
Message-ID: CAM_vCufwibz7iuKOuSc29-01g4vxde5dBp+ExJ-qQABwHqGZVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On Thu, May 23, 2024 at 12:57 AM Melanie Plageman <melanieplageman(at)gmail(dot)com>
wrote:

> One option is to add the logic in fix_hang_15.patch to master as well
> (always remove tuples older than OldestXmin). This addresses your
> concern about gaining confidence in a single solution.
>
> However, I can see how removing more tuples could be concerning. In
> the case that the horizon moves backwards because of a standby
> reconnecting, I think the worst case is that removing that tuple
> causes a recovery conflict on the standby (depending on the value of
> max_standby_streaming_delay et al).
>

I'm confused about this part. The comment above OldestXmin says:
/*
* OldestXmin is the Xid below which tuples deleted by any xact (that
* committed) should be considered DEAD, not just RECENTLY_DEAD.
*/
With the fix_hang_15 patch, why is there a risk here when we use Oldestxmin
to judge whether a tuple could be moved?

I think the keypoint is: OldestXmin and VisTest, which one is more accurate
when we judge to remove the tuple.

--
Regards
Bowen Shi

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Waka Ranai 2024-05-28 14:14:46 Re: Bug report - pg_upgrade tool seems to have a race condition when trying to delete a pg_wal file
Previous Message Bowen Shi 2024-05-28 08:29:10 Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae