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

From: Scott Ray <scott(at)scottray(dot)io>
To: surya poondla <suryapoondla4(at)gmail(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, 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-09-27 19:20:02
Message-ID: 4U4e3pJ5KQ-tMTpmBNHbrWptLVZb2m3DJoryggEAnGJKGhrcYoiDzE-ZvuTpUBHiX5EREnX1Ni-aqolFYkwCQaJnEBCfik589NXNcaOnhdc=@scottray.io
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Surya,

On Thursday, September 17th, 2026 at 1:14 PM, surya poondla <suryapoondla4(at)gmail(dot)com> wrote:

> Bharath pointed out one asymmetry already i.e pg_stat_activity shows
> pid, datid, xid and xmin to unprivileged non-owners while
> pg_xmin_horizon shows nothing, and this would be one in the other
> direction if the ACL were ever loosened or EXECUTE granted directly.
> Would it be worth applying HAS_PGSTAT_PERMISSIONS per row in the SRF?

No view in PG mixes revoke from PUBLIC with permissions checks per row.
pg_shmem_allocations, pg_backend_memory_contexts,
pg_dsm_registry_allocations, and pg_aios all use the former only.  This
patch follows that convention, sets a conservative default, and trusts
DBAs to configure access.

--
Scott Ray

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Cagri Biroglu 2026-09-27 20:35:35 Re: Per-table resync for logical replication subscriptions
Previous Message Manu 2026-09-27 19:09:53 Re: BUG #19686: Rolling back SET TABLESPACE