Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wUbP9-001IIT-0d for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jun 2026 02:32:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wUbP7-00H5U1-0C for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jun 2026 02:32:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wUbP6-00H5Tt-25 for pgsql-hackers@lists.postgresql.org; Wed, 03 Jun 2026 02:32:24 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wUbP4-00000000qJ1-2Isi for pgsql-hackers@lists.postgresql.org; Wed, 03 Jun 2026 02:32:23 +0000 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-68d232ed3f9so4669919a12.0 for ; Tue, 02 Jun 2026 19:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780453939; cv=none; d=google.com; s=arc-20240605; b=MW19LAebH0NmDIWtHCm4sgmiY0cEmRj3z9ardKLqq/crYPI6weSB+jlE/yFLhJcfA5 csaR4qxxXSZTh7T8b7e6A1iSZCzbprGjmhqLWfiNIFSSBZHe4DEssomQi6+4G0h0st5H Lr99YiIRDKsH2BhxYsAnLCs40JxqtCiwMgZdCdkahDV+7Lw4t48gJLKTwr5tVl19Fl6F ZWdBIu+Zyg1BwYjzjnoBrq2BDG4xKuc9YDRLOKbemPoYdoA/Ept/lvoDKGNtKW6cNkCn 1zXM2ezZOnh1aNXkBHrOtwsTCiPqmo9CZWaU6C3+W7LwQx0aFyebAf2fs+wMYfbvEwDR ehKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=IOtsfJwbNY9HOMSLi1NcDgTEmYe3X/FGCnYY6CFtv+E=; fh=JjtinjbhmJtDoVKda5FixHPDj34fxNNwMM1/rJ/WXgo=; b=DHxeJc85kWiGSRCdodfcvCuK+Henn1DsPwiA/NSGic1U95MHRZbCyuM93P4itdJBHF nBsMUMblqqou3lnlXdvEsboicfW+vX4ZIScDTVcrjUYDy7iDqxrazzSQCULGbog/+JTr Rrak77Y8TgDi4/Yra8rz15Hmi8u+Jb4rN+psKvpz2gXvack4xmoW1LwEv9lx9EW51XOY zZ4F1u/eFvDo3HB5eJiOOjH2B13221aMXwjtqRfMFWNl7HATL0BaSOrhmM+I2ryaPYgm F9NINpuh6qQA8R61GTCHaWkogJYnqNJ5BJkhfvOBzgoWqhkNfeWmv3ZVr7TvLivvfeTG JRew==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780453939; x=1781058739; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IOtsfJwbNY9HOMSLi1NcDgTEmYe3X/FGCnYY6CFtv+E=; b=GSiWirT4oriqMtdXFXqbJWW/jrV7gnxw+NDwJtN8TYHcQbWtOtWFfMNncSFzYVZZ20 z7ixvJPWTFdXJrECYF/Nl3TvyNj/ZXdygIWCbOfin+gvS/qV6NAwiQn5TwbIxfEP3LLC C3kuvFenkYyzHkVc9Z36T67uo/6EwDX0PnkiyWOZS507wBscCWHunEfIW8oC0M5XPuQb X2d6MCaeeTjovus7ZkMs8aii/rxNiRG33KpB1vi7CkYrZD4JrAVFtIvdw7k0cFpMnw/u J5u9H8KDojlzySqqKitX/sqySAYdJOujhdiClUTu6ccrBOL1kLYdd9IFvqP/bGSUB1Wq aMRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780453939; x=1781058739; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IOtsfJwbNY9HOMSLi1NcDgTEmYe3X/FGCnYY6CFtv+E=; b=Mn46sssRSz5BqHzLV2dkuelBj9LclzVjuUnZ5+M+xrBAYU353YH3EVIX26RpZgdta7 ah2vLCwgz4Z5tNhlfBcgiqfsKNr/bkF5Dfy6QpP9CPI2JeCXrUr2WoTbmBefEYlVMAF7 zhGAJ2G1qn2FHqsf9zTTmbqc/pMwAxBrmTvXad2b7Q/dal0vJOWoTFHd7qwrIw4AKMS5 Az4LmNKry1s3/pGCkGgxlWZc5M6/irI2hXyJRIRdF4J93oOQMIfT/0tVgx8vgoQq+BAe 4Q/rH9g7GgDud6UoCvrkOb1yyha4/DR6gJuxDxwIlYecj8xFA7W5yZc4M7ziUDsJFqNE n5Pg== X-Forwarded-Encrypted: i=1; AFNElJ8NGdQGmiO8IJccKIQ7XexWeRy9T6/O5+0fjIQKv/8Bji5oj5LWWaTHwYGfNIVF6JT9nT/i84gwTckf1yKF@lists.postgresql.org X-Gm-Message-State: AOJu0YzcRXq08PVfqVPaJ+tev8Rw9hW1Lfxs0wWTrjO3QzzpCaM6sLbd 9b2G2EpIH00lKo2ncv+Ef6eeWc4HzYtIaBQq/KB4vOKFCpu+YjBrt8VctRqO68xUIiRi1PD4r+P zmP8mVhU0QdSXod2md+Lj2U2C9s4h7KE= X-Gm-Gg: Acq92OEabesenUyIG75TFqNUc1PGT/LJgQUastrIETVkE69w8/F1mKGt27/2vXsWXi7 /KcH0qBBpI4gmUD/HnXeYvd2eh/uTZco3a2l5W0ZtHx+sy/wqihuC43r85YKcESBorbd7E9kif/ E1Gpef1+QEBnbbdOJainak5nzOxyXgXFC3o1awkSytgqDYZYuDRmudvj3wZSK7yndqbhM3Sk4ug 0bRM9TJMeTzlfj/5z2B4QvdikYGp+PFNT9SMkj68jXWKgsQOnagDBjL+qotfwotQ02QmWsu5/qd KYuM8B5donV0Sbs/wtSkZH1o6A5uX56wFLcP8cWhYC2n4fPj+VQeptKJEbM= X-Received: by 2002:a05:6402:e06:b0:68d:651f:ccf6 with SMTP id 4fb4d7f45d1cf-68e6f5a9f7fmr511910a12.4.1780453939196; Tue, 02 Jun 2026 19:32:19 -0700 (PDT) MIME-Version: 1.0 References: <6634e1b0b5b74e5c2e3b06201120a81e11d82a55.camel@cybertec.at> <3bnBUxwx2npXqvHL0trI11LOOvzQ7LI0GzWqbaj5SJnk7DTb1uzStGveKwj0JJmBW4ebzGIF3az7of4I4rQeaO_PRqDnnClCduPyjM6gPgM=@scottray.io> <20260602.165755.1084850050958933598.horikyota.ntt@gmail.com> In-Reply-To: From: wenhui qiu Date: Wed, 3 Jun 2026 10:32:07 +0800 X-Gm-Features: AVHnY4Kg5vgEiLNsaBntSc8kDvxzse1yFc1Qe6Hx5I3rsrOTGSBdk175-clSojY Message-ID: Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples To: Shinya Kato Cc: Scott Ray , Kyotaro Horiguchi , laurenz.albe@cybertec.at, japinli@hotmail.com, samimseih@gmail.com, pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000095b7350653503cc9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000095b7350653503cc9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable HI Shinya > I agree that exposing xid horizon retention information via a > SQL-visible interface is valuable. However, I believe reporting it > in the VACUUM log is also important: a view only shows the current > state, so once a blocker has gone away there is no way to determine, > after the fact, what was holding the horizon back at the time a > particular VACUUM ran. Logs are the only durable record we have for > that kind of post-hoc analysis. Agree +1,There's no denying that checking SQL is easier than checking logs. Logs are also important though. In fact, I think we should apply this patch first and implement the SQL later. Thanks On Wed, Jun 3, 2026 at 9:25=E2=80=AFAM Shinya Kato wrote: > On Wed, Jun 3, 2026 at 10:05=E2=80=AFAM Scott Ray wro= te: > > I've been working on a view like this. It shows the horizon > > contribution for each backend, prepared xact, replication slot, and > > HSF walsender, broken down by class. It also shows - for each > > contributor - how the horizon would shift if that holder were > > removed. > > > > Shinya said [1] that we could have a view in the future. We could > > have both the logging and the view call a single function that reads > > the procArray and other sources to gather the horizon information. I > > think the logging and the view would complement each other. > > > > Should I start another thread? > > My mild preference would be to keep the discussion on this thread, > since the shared function design is central to both the log and the > view and may be easier to keep aligned in one place. That said, I'm > not strongly attached to that, so please pick whichever feels more > convenient. > > > -- > Best regards, > Shinya Kato > NTT OSS Center > --00000000000095b7350653503cc9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
HI=C2=A0Shinya
> I agree that exposing xid horizon = retention information via a
> SQL-visible interface is valuable. Howe= ver, I believe reporting it
> in the VACUUM log is also important: a = view only shows the current
> state, so once a blocker has gone away = there is no way to determine,
> after the fact, what was holding the = horizon back at the time a
> particular VACUUM ran. Logs are the only= durable record we have for
> that kind of post-hoc analysis.
Agre= e +1,There's no denying that checking SQL is easier than checking logs.= Logs are also important though. In fact, I think we should apply this patc= h first and implement the SQL later.

Thanks
<= /div>
On Wed, Jun 3, 2026 at 9:25=E2=80=AFAM Shinya Kato <= ;shinya11.kato@gmail.com>= wrote:
On Wed, = Jun 3, 2026 at 10:05=E2=80=AFAM Scott Ray <scott@scottray.io> wrote:
> I've been working on a view like this.=C2=A0 It shows the horizon<= br> > contribution for each backend, prepared xact, replication slot, and > HSF walsender, broken down by class.=C2=A0 It also shows - for each > contributor - how the horizon would shift if that holder were
> removed.
>
> Shinya said [1] that we could have a view in the future.=C2=A0 We coul= d
> have both the logging and the view call a single function that reads > the procArray and other sources to gather the horizon information.=C2= =A0 I
> think the logging and the view would complement each other.
>
> Should I start another thread?

My mild preference would be to keep the discussion on this thread,
since the shared function design is central to both the log and the
view and may be easier to keep aligned in one place. That said, I'm
not strongly attached to that, so please pick whichever feels more
convenient.


--
Best regards,
Shinya Kato
NTT OSS Center
--00000000000095b7350653503cc9--