Re: pg_xmin_horizon: a system view of everything pinning the xmin horizon

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: surya poondla <suryapoondla4(at)gmail(dot)com>
Cc: Sami Imseih <samimseih(dot)pg(at)gmail(dot)com>, Scott Ray <scott(at)scottray(dot)io>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_xmin_horizon: a system view of everything pinning the xmin horizon
Date: 2026-11-19 01:38:38
Message-ID: CALj2ACX35eGFSAKOvXh-WeKu+3AgzYJK1pSXfhJ12YYyg3w93A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Nov 17, 2026 at 1:32 PM surya poondla <suryapoondla4(at)gmail(dot)com> wrote:
>
> One thing I'd like to keep from v10 is the xid column. In v11 a backend
> row's xmin is the older of its xid and xmin, so a backend that owns the
> oldest xid and backends that merely took snapshots after it look the
> same. With one idle-in-transaction session and twenty readers whose
> xmin equals its xid, that's twenty-one identical rows, and only one of
> them is worth terminating.

I would like the p_x_h view to report what goes into computing the
xmin horizon (in this case, the older of the txn's xmin and xid). And,
users need to look at one of the existing views depending on the
blocker type (p_s_a, p_r_s, p_s_r_s, or p_p_x) to find out what
exactly the blocker is doing, and then decide. I don't think we can
avoid that, otherwise we would end up duplicating many of the columns
from existing views in the p_x_h view, which I don't think is a great
idea.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-11-19 01:44:32 Re: [PATCH v1] Avoid deforming unused trailing columns in COPY TO
Previous Message Keyerror Smart 2026-11-19 01:36:56 Re: [PATCH]Fix planner's strictness check for JsonExpr