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 1wUa2u-001GzK-1M for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jun 2026 01:05:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wUa2t-00GmlH-0v for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jun 2026 01:05:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wUa2s-00Gml9-2a for pgsql-hackers@lists.postgresql.org; Wed, 03 Jun 2026 01:05:22 +0000 Received: from mail-4397.protonmail.ch ([185.70.43.97]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wUa2q-00000000xXZ-1NHP for pgsql-hackers@lists.postgresql.org; Wed, 03 Jun 2026 01:05:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scottray.io; s=protonmail; t=1780448717; x=1780707917; bh=KsDRrblk1Is9fNYwYITbgMh4ywSijjfpIYXo31XdtAs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=F1HyxRfOBB5CEi7oDJ/6DVXEWh72R6dhIV+Jra6KCfQ7w3oCPUY3VMthA52Jg83Uu JRGb8UizyyWGtv+5LLNY1+5KETaBFOPPsYamsdwNFHwOnZP/U5qYK6lnYGWCw6VEzm axpEdL6hZwQh6Ibo48L6/51SYHiK4I7XPyLS9I7B3I15kq7U35SfB3XLXP/cBT6nD0 aXvYNZDDBmTS6MLepHEw75JUHCGtxs1E+6kqZ/pSFelPzJqbDV7rotceZGDmY+aRfA kvZcok31Fqmqy3t7wuJxIysmj2/mbJxBUa7bh0BLhVl63Zi/pbeYNnJPwXOiU497xk vIdD+4xGHIMVg== Date: Wed, 03 Jun 2026 01:05:13 +0000 To: Kyotaro Horiguchi From: Scott Ray Cc: shinya11.kato@gmail.com, laurenz.albe@cybertec.at, japinli@hotmail.com, qiuwenhuifx@gmail.com, samimseih@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples Message-ID: In-Reply-To: <20260602.165755.1084850050958933598.horikyota.ntt@gmail.com> References: <6634e1b0b5b74e5c2e3b06201120a81e11d82a55.camel@cybertec.at> <3bnBUxwx2npXqvHL0trI11LOOvzQ7LI0GzWqbaj5SJnk7DTb1uzStGveKwj0JJmBW4ebzGIF3az7of4I4rQeaO_PRqDnnClCduPyjM6gPgM=@scottray.io> <20260602.165755.1084850050958933598.horikyota.ntt@gmail.com> Feedback-ID: 189710061:user:proton X-Pm-Message-ID: 3cba2211d49a8c1a5ed679148da11ab8447a59d5 MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="------fe15723b38dc3d4abf41602c6fe22938a836594be6ba67141b62ab352efc8faa"; charset=utf-8 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------fe15723b38dc3d4abf41602c6fe22938a836594be6ba67141b62ab352efc8faa Content-Type: multipart/mixed;boundary=---------------------8d9f188093e17d92b4db7475537bbb58 -----------------------8d9f188093e17d92b4db7475537bbb58 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 > What I would want to investigate after seeing such a signal is not > necessarily what happened to be blocking that particular VACUUM > operation at some earlier point, but what is holding the xid horizon > back now. For that purpose, a view exposing the current xid/xmin > holders seems more useful and less misleading than adding a > best-effort blocker guess to the VACUUM log. 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? [1] https://www.postgresql.org/message-id/CAOzEurTNVkvvscKeEOy0WwfzyqO+J_M= yXwkjRteJ_zyydteKCQ@mail.gmail.com -- Scott Ray -----------------------8d9f188093e17d92b4db7475537bbb58-- --------fe15723b38dc3d4abf41602c6fe22938a836594be6ba67141b62ab352efc8faa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wrsEARYKAG0FgmoffboJENJWjBT/u5s7RRQAAAAAABwAIHNhbHRAbm90YXRp b25zLm9wZW5wZ3Bqcy5vcmdONYXppjw8SqOTxURyHaoFEFSTHlcPjN2sEhQP 0KqSohYhBHp15mAbLriqt8a+vNJWjBT/u5s7AAC/IgD+IbYqkYrY8tKtXVVQ YkFEBqTm7Xcx8slG93AHsqXuoBAA/1tkixsb8DZFI6tvEbUlNRvMqi0Hh+0Z 0qi/tYMfRV4E =W6GP -----END PGP SIGNATURE----- --------fe15723b38dc3d4abf41602c6fe22938a836594be6ba67141b62ab352efc8faa--