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 1w7Ebq-0056DK-21 for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 15:32:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7Ebp-004QhK-0L for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 15:32:57 +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 1w7Ebo-004QhC-2d for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 15:32:57 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7Ebn-00000001pEU-1gjr for pgsql-hackers@postgresql.org; Mon, 30 Mar 2026 15:32:56 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-b941762394aso689934466b.1 for ; Mon, 30 Mar 2026 08:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774884774; cv=none; d=google.com; s=arc-20240605; b=OTbJ3pz8W5BTGsqtuFca0/ssFrdR5Fo2rhurM8RKY976PtJEStY5Rm5diCGrRMmg+K YTZ1Jpndp7KfB5zu0fdncxv7sUqrZWM3joAK/0lTyOHingfDwc+KNKVS6E8A/Gma+ly5 7Ay4HjcApa9FejHIDxuhrphnsEvsBSBGr480pw8nhnzfhH0mmSQG5QlkNMDf1HoLOX8F 15XK7MUEIDy6JIclRStS07lpECOkPEuSfcmZwsAZFQSVCboiQyTJfjoqwsNlqaP4jzWD wSITvlQeONP6g1do0CUzzgBH9J5bJGFSMwegf5goBbZYaC5BsPR0aJiIpRgKGCb7uFtG rhcw== 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=B01T5G/GxDwBc9B+txujNm8/CRmcvMa6aBvtrKTSkE4=; fh=EQACobJaX7AbJ++Nmh/B0+EMHGN1l00WmDwaYWMJ9v8=; b=HISpa/JbOvuHo4R9yaAdY96x6cnGVSB3pDbnO4Opco20eGhF8uUMPfVDOimyy4UtPl MzJXHq7aL+E2MsfhuxhT0HssH8u63YzqHmFPwr5L/P6YAaeL5j5gVx6m6N4V3IT6/ZIg v6fv6s0Xz7f8gnaw3aJKSrzr2+QW7w4nyJFgYbdVD5KAzVrlnVeLHabXFdkvU86tj1YZ VAlonISjS/ZbdOVrqGSmgoTZ/WW56qUapOk4EHV2V3nsBYGTlnpiP+6orcY2L8DFblW5 i3wzQUOg2Z8xaqhc7Tn2CtKjzZsKr3mpPk0fGtWE0UZGSs+BFYZIFz7BVgALCgxM9swV Q9IQ==; darn=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=1774884774; x=1775489574; darn=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=B01T5G/GxDwBc9B+txujNm8/CRmcvMa6aBvtrKTSkE4=; b=rXuq4jwdqAl/ARfFm7J6C6l/uVWs53ld7l/2g8n7BjCNVfQaSgC+8USHOZu0X52mWv slQgtbaGNPUyITOwVs+pQqSqsPbAD5pyX/fY+hh2GzRifgzgBCXFGq0nwyD3MmBxXxOv Rm5ih2ZSQwnUZqqp7BDiL09nEDCS3nhkfQK/O8dphkOisKeaqWraDOUw9PrfcDvMbhsJ R1NWFUnNeuCxafyn0b4snDEkwT9ueMQTKrP+LHFRvJ4nRKucnSdcBpCL3qekdl+scu9P s+UrYaVFvt5wi2MVDoKT6Fz2VQAshOcHklp8Rp5ZKNX+yzey2SyNIQDR471jPKYB3tJs eADg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774884774; x=1775489574; 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=B01T5G/GxDwBc9B+txujNm8/CRmcvMa6aBvtrKTSkE4=; b=Ptiv4j2hsj1ZF1Y81uGkuHPSsKOYyORib6xIsrv9kfGCFy4TTK0+wv+BDhFtJuppfY to8Hwf669cT/bbc1yPlUQsLt9gTNlOkd+zj6NkCdkPeYVvNy5+MybYdzH+OvBVu9/Msf 4hVXciMsVOgBLj7VAivbqY14lWtvZ6h+AXJWLgbSt7y7bxyI1UZNQsgExnQT4aX8rI+K MffTuNCMoCIgMaSx9st7hqDaR/VVNyMJB8B+WHcqpP1gcvwrRt2IG77VI+CVhrTcWu44 aJsOoRMvodBwIVwwbdXrNVprETtsqn+eWDUdgql/wnd6TPlubBA5xHSkqIvAqzpuCe8D 9KJA== X-Gm-Message-State: AOJu0Yxzxis6VSlMTb+o9MJHPNbiI4piM9Rr5jZBX0/STNeAavgT/YQn oKzOl2JUtydEYubwPtVTL23CiI5eAA6ATPUPTNYTziiks1HtJL8KbGDLuE/3jNFf571Incsrn8t 9eTs3ONvELPgmbD3kxOMaG9GwvVr1URo= X-Gm-Gg: ATEYQzynf3lmYiMgdhbMKYJk7pdbfwAP+UzWzfQd+CN5xWjiZ6E9wXgEC9DKCi7N8WZ gqAqnGdcYEs1JgD27iitYxUjrWPFSN8/R9mR5ZgJrTuHWDJ+NPa1jyCkQv5IzTPDMw5oPAGp6M8 j0qsL+scyiuT6BPl3qb8AG/2tVjucdR4I9wAgEJst0nRI1RlGi8FjcCELdd10oH87R9jJpQYd5B fAwtPMZT/+aFeml4rnGM3wU53NPspQfBF8RuCi64zI1pW4YzWPNi/4HNt6uhNOJdN/8I4ybHFrj 6MQSDQ== X-Received: by 2002:a17:907:9306:b0:b98:4abb:cc49 with SMTP id a640c23a62f3a-b9b502bfd00mr762804566b.5.1774884773407; Mon, 30 Mar 2026 08:32:53 -0700 (PDT) MIME-Version: 1.0 References: <202603301508.up22nvhgnnoj@alvherre.pgsql> In-Reply-To: <202603301508.up22nvhgnnoj@alvherre.pgsql> From: Sami Imseih Date: Mon, 30 Mar 2026 10:32:41 -0500 X-Gm-Features: AQROBzBSpelgABuSTLFwlT5gWXAxIZMrGmLrGc-KvML9ouolAN2vCT6VH2QNQVA Message-ID: Subject: Re: Add pg_stat_autovacuum_priority To: =?UTF-8?Q?=C3=81lvaro_Herrera?= Cc: pgsql-hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > > 0002 introduces the view with documentation and testing in > > vacuum.c (xid age and mxid age scores are not tested as > > they require xid_wraparound to consume enough XIDs to > > trigger a score, which will cost too much time for a > > regression test). > > After this patch, there are three copies of the combined call to > pgstat_fetch_stat_tabentry_ext() and relation_needs_vacanalyze(). Can > we avoid that, ideally reducing to only one such? Or, at least, it > looks like recheck_relation_needs_vacanalyze() may no longer need to > exist at all. recheck_relation_needs_vacanalyze() can be removed and replace with compute_autovac_score(). I was trying to minimize refactoring, but this seems worthwhile to do. -- Sami