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 1w7bAm-005VXn-1n for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 15:38:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7bAk-00B007-3C for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 15:38:31 +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 1w7bAk-00Azzz-2J for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2026 15:38:31 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7bAj-00000001zNH-1Gln for pgsql-hackers@postgresql.org; Tue, 31 Mar 2026 15:38:30 +0000 Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-7d556c1a79eso5993064a34.3 for ; Tue, 31 Mar 2026 08:38:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774971509; x=1775576309; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=scH0WISTHGeKJJ/UMzTOx339K+qEKI/hM3jreGoOCi8=; b=cEzEpMfMu/wo1bNZ8W7RlTzZ2TWWZfaaNKEcC44e5ul7sf1r6oFz+0cbv3/jgv1Drw pAb4mAd2n4p++43TKa4Zw9t4BY51NN1ag7GAGTk28DNNj+PB0J85ywOgvUrhS3UsTQBo SqI/RMr3lxvS7PUi5Q1hrjYpTmExepT0vH9jf7+rCs1DRcqDWqLXhYSbzPwug6CenWuq rnIt1SptNxO+Wot4A5iMwHv/xxjxhG55kmtyxl5DY0a7Y2pDwPp1DBICJxLtW8UUhQ2c 13+YriDroPhxNVoQpnd2bktrl/aFzmMnk6c+Rc/Cue32rnGe5+UqHsY8Y9HK+JdJF4yc UsNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774971509; x=1775576309; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=scH0WISTHGeKJJ/UMzTOx339K+qEKI/hM3jreGoOCi8=; b=ND8ME1cJoK7K1+QQel7x/UtoAtkGzOM7ej2bMYDbwFOTHszA8qA11B1+KuZcEo1ySw VSElVV0zuQ8j5bxVVJa6rJzYmCKvNDF84x7HczA5LBlgQMadO0c77vizq+2WNpxkECHj lJSdRpvJ06d2EIJdQnCZHwhBnGZfG98ptcJYmagH0ZUqCsb6rXxRsXkzWZUh1alC2uOf lEArdLDee9J+/RlORqW7ece6bJQq5DCFUBB7cADsHxcBG6mBHflcxX4TwqVlugjj16DC xqyRMF55TJF+mHIJQw90GjSVno3gksvhlOSKTX5EL56ORyWRDgk54kr7bccwG5WoOFQ6 sQog== X-Forwarded-Encrypted: i=1; AJvYcCXXDu+hlWX7bolNYEVKcQpkj52Xus656tpPfx9xziTokiqj8yFQzjN5WoVflE+5f3u0gYiZL5hqTJwRUsxu@postgresql.org X-Gm-Message-State: AOJu0YzgCr82hDqlgFqG6CFERQj+PYZNKRt1nH293WSeMmg67EbHEs6V tdEB/x+84Z1QX9ph/tfTOUeenL77nlQxxubZBVeje75x6n4+MLUYnEs9 X-Gm-Gg: ATEYQzxXCJ64xk6hH3t1MqxvucEKHWck2Sw4iFOA5AsKmTYsnh1GBWPRKB5+KeL8bOv hujxyEamXGyvjCwBTSeLU5+nLskU0GwaknT83451X124voHT4lmfFxKb7hhQbd1AsJxE6QG4cuO P6AWDLvU1ISRr4jBAV+8H/jiynGNDeNAyGJg1eqMaMWK+F6K+sW7U7cm6YYThygAcsDXpg61EOe U0DuClk/FAfyaBwLhHuhkBaBYzF9eulI4qbnxz74/PNOGrKtmFDnJtzGKXkZGknqTO6oqtma4Hj lLfWQPO1QptIHo/RD4amnG70DRdnI3MV62vfEXJ+MkvVgPaZuEGPEBsP9AsctsLtt3CtsP1XXQL ZAVJQ4qZ+NqIRPg2HHxZO0c/fPQh21Kv3dFFrhxpBo4C+4mdQlvvIa664Qi2CV2qtzM9Lmrstbr 12bqeYfsJuQw/C5dXahe/pEIwL/rEv2jilVkyNkVteUE1x2hX1zFep9/9cKtcYl8m6CgpW6F1T1 +36XTSNXMx63X+SrlE2Mg== X-Received: by 2002:a05:6820:629:b0:67e:15c2:9d85 with SMTP id 006d021491bc7-67e186330f1mr9360574eaf.21.1774971508753; Tue, 31 Mar 2026 08:38:28 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-67e231e6f7csm6997990eaf.14.2026.03.31.08.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2026 08:38:28 -0700 (PDT) Date: Tue, 31 Mar 2026 10:38:26 -0500 From: Nathan Bossart To: Sami Imseih Cc: Robert Treat , Bharath Rupireddy , satyanarlapuram@gmail.com, pgsql-hackers Subject: Re: Add pg_stat_autovacuum_priority Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I didn't read any of the thread, but I looked at the patches. 0001: + * force_scores set to true forces the computation of a score. This is useful for + * tools that wish to inspect scores outside of the do_vacuum() path. I'm of two minds about this new function parameter. On one hand, I see the utility of forcing score calculations even when autovacuum is disabled. On the other hand, when autovacuum is disabled, the scores are actually 0.0, and it's probably a good idea to report exactly what autovacuum workers see. I also see that we're not forcing the computation of the (M)XID scores. Is that intentional? I wonder if we can rework this function to always calculate the scores, even if autovacuum is disabled or !force_vacuum. This way, both paths are doing the exact same thing and reporting the same scores. We might still want an extra parameter to avoid DEBUG3 in the system view path, but that seems like a reasonable difference between the two. 0002: Seems okay to me. 0003: + + + vacuum_dead_score double precision + + + Score component based on the estimated number of dead tuples + needing removal by vacuum. + + I think we should make sure the column names align with the names given to the new parameters [0] and the new "Autovacuum Prioritization" section in the docs [1]. [0] https://www.postgresql.org/docs/devel/runtime-config-vacuum.html#GUC-AUTOVACUUM-VACUUM-SCORE-WEIGHT [1] https://www.postgresql.org/docs/devel/routine-vacuuming.html#AUTOVACUUM-PRIORITY -- nathan