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 1wUa93-001H4s-2C for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jun 2026 01:11:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wUa92-00Gp02-1P for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jun 2026 01:11:44 +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 1wUa92-00Gozu-0T for pgsql-hackers@lists.postgresql.org; Wed, 03 Jun 2026 01:11:44 +0000 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wUa8z-00000000xbB-3SGl for pgsql-hackers@lists.postgresql.org; Wed, 03 Jun 2026 01:11:43 +0000 Received: by mail-qv1-xf2e.google.com with SMTP id 6a1803df08f44-8ce9d444173so34653766d6.2 for ; Tue, 02 Jun 2026 18:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780449099; cv=none; d=google.com; s=arc-20240605; b=aOyVDOtqZbvOD9TsmgiJhbDSsKJFuW/AKZ3OICiXG4xWReQVvN4Jit372CTVx0h+TZ ertTryoOYnD9TJ2mzL2VpnLpGGyBmklGVgjjzEcrcFwecg2IQj9EKMemj2d69fZoabY/ 4x/5q4k1kXHcNsBrO9a1ktYSj0u80F6XwjJLPDLE6PV16djUzgcmDsIJGhZhH7ja8rPD vHzbxcX7v4X9a78Hom1tU4mnYVNfoE4Wzl9AzTEz/iqG6dPQFETkK4O9ih6+uEgnMr8U SJeI02KM5SlojLFnY5zosVL0airzGHeGy7b3yj+dH4c+MR7hfzUsi6xDojjscj6nT0sK EoVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+khwSzKGmyUohmECI4lepoDgtJKJx/DBy2Pt1KO/0WI=; fh=7+zZZKCXF6CIYBAXoQghd2TF29x5RQeJ5xDUyJe6Ff0=; b=Rtlz0EmHhH5INPW+aPJx3LfQa8GwpWZXauv8bDspH8vc46k59SEvEaIIEw/7EKqw8+ d8ZAWl7fQv46LSQ6DSHHdJjZ3rYDwzOE69Lup3dqHk90D4rQrCzpIKR5ZgiuiU1fNN4M pH9Q4RnZS6QZ5t1xPI3+ZXi7VDuu80FL2zvgbUQRKFajcutcZ3Jy1JcbIIIN/KHagBmP LDAtSekTAv6fu5/owZghANurvMoSpimo591HN2aTSFBcTBts45EQixTAN44sAhWKwyzf Fixq4gedwmqu30T9WQ9ZucP5YOfmUFxfPg+s4QdBG0Q6v15rfMAEAJOCpq0VF7EEkeBh jEtQ==; 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=1780449099; x=1781053899; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+khwSzKGmyUohmECI4lepoDgtJKJx/DBy2Pt1KO/0WI=; b=Iz1RyCqkGQ3qqtxlrGuUtP4w2Ut8tIr+FgX/2sWVE0TGtpOqM2uVek3rzp/7nInvI/ LjS6ZkHJ+fcE/H8F6EkeAFkBgbr0Mu+oVrFHdtRZJ04B5trYOfs3t7VuOGiIKfGB5FN+ DS30nKg1PQVwpuehS6+wHOxtj0TV/JsyDe3+dYb09d9/4G0qYBiuW+qTdCr+opgSJmS+ EYqVjIBdoDANm7wuK+/xYuWTZOdjPlzrR3NmKG12Gpk3P/pctqPwZf3oYbYl9kYhPHCU YsNoavXDFqbCBFe5kq2yQOcIbEUg5qy/s5K/f18x5eXr6FQVALLaz336Wp9AOaLZKDR0 Zc/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780449099; x=1781053899; h=content-transfer-encoding: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=+khwSzKGmyUohmECI4lepoDgtJKJx/DBy2Pt1KO/0WI=; b=RTwTND5/oBnup6pGvrkVCXV7jvoGPyq9cuHldsHRS5QNtEd1bQ4Kuc2FeDGDtiKGGY D+/j+mz9LufAA7vU1sfEIg3XcvH5GK0kGaItmmbwWKJKAuf3skTNcyZlA5TqM9uUHr0j hxxT4PQip3qRsj0YiYEkd1c2A5UeodCynnr4qprdM38FCrVPYQ0E9I03/cHLiPtJdBs3 meOP5FqP4fVblpvr3whBal6Nu/ZseZkwn/O/UjSFNPigkxnb/3aZv2iDeiTGKPSXesYM UWWAUyI/d1g2aL6x4fispCYFupfXbp8TxHy2/fy/UkYFq1hGNzwvj7ayVMakVoxXPgp3 7JZA== X-Forwarded-Encrypted: i=1; AFNElJ+N0hsYi6MQMWzueET9VYbUdH9t4w3HJU90X30Imsu1rKzilOPTIRU26jhWbdwR9Rgl3pwkGdYpqZAFIt6X@lists.postgresql.org X-Gm-Message-State: AOJu0Yw7zptT6q/p5xlz9LRTQABlWsFSgqBwgpOslojx5TqNFv9hoUkk lGO8WQHubkf6EovEDkoFSt6H3wk4KI9yJFyH9WJ5K8Gv3mx84mPLg1PM0QwEEer35b4BWP8e8yv IRGVcBZettDmVdjB0juq+LB9IdNPs5Q== X-Gm-Gg: Acq92OEcDqbOyFz3X6pEK7Nm4eykh+EJ9v166CP7iyTVEuuu1cFIFEtNNCfgT8Kswyt njrLwDIhPEgkCMZMTeyugMu5sGs2nBaGACH3LEFq0FkPJGt8I2FlG9f64i0GUZDVO97h2xEc424 jW3IuSQaJjGj9rXNjb09duGpbtUWe69v+5HyqvGxdVSdeFqmLm5Zl7w9mWC3BijGCWR+r6g9Ej3 onVDR0bLmt85kKiIXjtV6DdSA/KL06eSIPmNCsy83lcGxV9Vtn5yu0R6DfP9eIqyb1zqWscB7TD dOuLHFndX56/UPvJE8SDYf8vUI+WRFz+EfRdnyg7y/eTKzwD0w== X-Received: by 2002:ac8:5794:0:b0:516:d4b1:48cd with SMTP id d75a77b69052e-517785ed0cemr24616671cf.2.1780449098888; Tue, 02 Jun 2026 18:11:38 -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: Shinya Kato Date: Wed, 3 Jun 2026 10:11:01 +0900 X-Gm-Features: AVHnY4LeeAIc5CE91H7dkTfM3j_SIJE9scK2yWVvqlcx6Z_ZI6yuzgNyb7RCXDQ Message-ID: Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples To: Sami Imseih Cc: Kyotaro Horiguchi , scott@scottray.io, laurenz.albe@cybertec.at, japinli@hotmail.com, qiuwenhuifx@gmail.com, pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jun 3, 2026 at 8:34=E2=80=AFAM Sami Imseih wr= ote: > > Hi, > > > This may be just my personal preference, but I'd rather see > > information about xid horizon retention exposed through a SQL-visible > > interface than added to the VACUUM log. > > > > VACUUM VERBOSE already reports the removable cutoff and how old it was > > when the operation ended. That seems sufficient as a signal that the > > xid horizon is being held back. > > > > 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. > > +1, I also had a similar comment at the bottom of [1], where this informa= tion > is better to be exposed in SQL for proactive monitoring. 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. That said, I share the concern about emitting best-effort information in the VACUUM log, which otherwise reports facts observed during the operation. Would it be acceptable if we reported the exact blocker -- captured at the moment OldestXmin is computed -- rather than a best-effort guess reconstructed afterwards? --=20 Best regards, Shinya Kato NTT OSS Center