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 1w93yz-0019xn-1F for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2026 16:36: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 1w93yx-00HLzm-31 for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2026 16:36:24 +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 1w93vv-00HJNK-18 for pgsql-hackers@lists.postgresql.org; Sat, 04 Apr 2026 16:33:16 +0000 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w93vs-00000000Xwo-3hqz for pgsql-hackers@postgresql.org; Sat, 04 Apr 2026 16:33:14 +0000 Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-7d7fdb922a5so2228671a34.3 for ; Sat, 04 Apr 2026 09:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775320392; x=1775925192; 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=PJfCeu/IbhuXyFYWcL62V8vxUUVXLtwn05SQn4XnBEg=; b=j7wUTIoP8FfspfClSXgYjC3KHai7E7Tlbm8ku36zZdvmfIms7+EI0Q7tC0QPdtNWzj 2QjP6TW8Cw2lHe5ouGjR4LYBvhg7Eubs/7gjqrJgc1abt7fMrC4iEuEjxft+iN892E5B RUzhz6rUo54++j7s3+k1TxBuDGosXDXpAyvAL+2uns9Tcj1slxCNkvsSPEW/eLl5EITU ysTwRuuew3FAb3Mgihx+hLvI+EuRJqVBZ+M0EkP60bqPSgk6sOPQKjPzCpjAfSjQ/ULB k9bQ1WG0ACAQXfWl0sN1vuuLkzt1wBEtJXR06nZqykjIlP2FhyEJRw72CPU194F5Qi4o s9Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775320392; x=1775925192; 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=PJfCeu/IbhuXyFYWcL62V8vxUUVXLtwn05SQn4XnBEg=; b=Driwdy7vKjAhpx5CCgJ/KNLS82KamfEe5GG6XRbj+CowVo973pnRYla8+Rx/eLBR0K QaxNZTHM5+HS4yb51rUksRFXCYoq2EWxqepjjfp/u3ceYpItY06C9FlXbCNBKqVqTRM8 ENy5MpMiJrqcOAjoyycIRNlGjNAjY07wro9hJNfahOwul365kuT8ggMphNoFbLyQAlqv 896utPIfSpTpPj8RM+xZRV0uuMsZFri+YTA5tZOqRML9SO0AnRcCL/NA7Oz51OhvqXxh crOAdf6P6U1sLD2M/vMykXRVPuT2ksXPiAt7SNZLYJA49LOPceFjeBYNcG5Fp9KiQgDD 7uAA== X-Forwarded-Encrypted: i=1; AJvYcCWtZ+QJNwTgj3KrXbikNrNYCjfRGlVsh7zmcZPUo0pG+SUQPoP4wU+yb6IZlNeKZSvjkijXW+7dU6QyvKDS@postgresql.org X-Gm-Message-State: AOJu0YwHO/5dPPFKWcVxuH/1eidIZs8DpX73LpSO0ZOLY4zfpwdXQtpZ w0iXSXMLDgswuAKKambVaMAq9dCJYAoUXyadHUdXSIzsfoEtpDw8EBzE X-Gm-Gg: AeBDiesuXVGeqALGPDO0ETHx9vCAehNf6iGeBwRzKC68kybOdr5slj6ZNkTQZxTBk0j 63YN7YHeo6bkm2D2LUvuLM/V1yVf0lX6KfZdq28jHXCHifpiUbnqCr71eljlSkz4WJGmEj2m9+q P8lTxKFR3lXXK3neLKcd6s2ke0x5Qp4qRE/xINFS2RxzZPlgXHT5t+XH/KA3AfPiM4SA1N1mSRP lh5ZBVXQdh4id7h/fmkY1uwJgXev9pJ1rhGkboPeW7gW22/2anmY5UZRlAnSVFThlNJYnVA21Vy 9Keqrd16vGSlFLrn2+7koH+I0AFzffgnDefDr7v1Rq3Om5eY9MQjghkxLZka5rKZsX6Aud+bDPw YuIgm5cff6cck+CVu8sUvZBoQYV5TywN08KwOGa95RO0NsWSgV+UyxTxKIDstsvR4p22BxriT+C UYcqYPw+I86KuLa2nUuqzOZtvtPSuwrhP6xxdmMOG/EAUB1rWIWCCwVrqRpPlZf5pDJx8/QM/ed DmKjbrCmCTtKITTfyCtDw== X-Received: by 2002:a05:6830:6016:b0:7d9:ae99:8f10 with SMTP id 46e09a7af769-7dbb70d0386mr5521251a34.18.1775320391839; Sat, 04 Apr 2026 09:33:11 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7dba72fd409sm6423066a34.16.2026.04.04.09.33.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2026 09:33:10 -0700 (PDT) Date: Sat, 4 Apr 2026 11:33:09 -0500 From: Nathan Bossart To: Sami Imseih Cc: Bharath Rupireddy , Robert Treat , satyanarlapuram@gmail.com, pgsql-hackers Subject: Re: Add pg_stat_autovacuum_priority Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Zo6zvSwSGWTStc7v" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Zo6zvSwSGWTStc7v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Apr 04, 2026 at 10:32:07AM -0500, Sami Imseih wrote: >> On Sat, Apr 04, 2026 at 08:25:26AM -0500, Sami Imseih wrote: >> > "Scores greater than or equal to 1.0" in the comments >> > of each field are misleading. This conflates scoring with vacuum/analyze >> > eligibility and it's possible with a autovacuum_*_weight < 1.0 to trigger an >> > autovacuum/analyze. >> >> Ah, that's unfortunate. I think it'd be good to give folks some idea of >> what autovacuum will actually process. I wonder if we could adjust the >> documentation accordingly. > > That's why I thought having the bool fields made sense in the earlier > versions of the view. Since autovacuum is dealing with 2 concepts: > > eligibility: is av enabled and is the table meeting thresholds > score: The priority of how the eligible tables will be processed. > > So, while this could be explained in docs, I think it's better we report > these fields. I understand your position, but I still worry about potential confusion if when dovacuum and needs_vacuum differ. And I don't know how much we really ought to be tailoring this stuff to clusters where autovacuum is disabled or where the scores are being adjusted. Also, I think we ought to go into more detail in the documentation, anyway. So my instinct was to do something more like the attached. If we did report booleans, I would probably argue for just reporting dovacuum and doanalyze and calling out the criteria for why they may be false even when it looks like the table needs processing. -- nathan --Zo6zvSwSGWTStc7v Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v10-0001-refactor-autovacuum-subroutine-in-preparation-fo.patch