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.94.2) (envelope-from ) id 1v6fkz-0080To-JZ for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Oct 2025 01:47:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v6fkw-00EL3H-ND for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Oct 2025 01:47:47 +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.94.2) (envelope-from ) id 1v6fkw-00EL37-Cr for pgsql-hackers@lists.postgresql.org; Thu, 09 Oct 2025 01:47:47 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v6fkv-0018jF-0i for pgsql-hackers@postgresql.org; Thu, 09 Oct 2025 01:47:46 +0000 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-3324523dfb2so486345a91.0 for ; Wed, 08 Oct 2025 18:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ardentperf-com.20230601.gappssmtp.com; s=20230601; t=1759974463; x=1760579263; darn=postgresql.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=EiU/mqU2KKtB3M5O1kTzQ/ateaslm0+EgFWlVNtPb1E=; b=UZIB+V5ZX2EgOWyJt960O2a5Bm9MC7VGfScgD1hxiOt5O3AUe+AKDknJBc9dNHOmpE jXS+siiAnNDxvteShriDStqM2UQerYj78wNkvuB+Ry8zZysl195KK/uM+9DLRWLwboGS hxmzSUd9pCGTcYfm32ufILwG51dSV7in7OZ8Se6xSrIW8ogidxOvS1Dif/VJWuJYdip9 1e4rKDUtfegsVrYmfK7a3Q6QPDJN2CWxBkBlCORyUn02Qp+k2WPzxTwbXVa/2sw372RG 6/sCQOCARw32rkJ9hsFixNF8ACzAkqG5Z8ZuoRKJQoOMs03bIap8LviREBgHUyjBZJdr Cpjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759974463; x=1760579263; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EiU/mqU2KKtB3M5O1kTzQ/ateaslm0+EgFWlVNtPb1E=; b=AAzHjx7xRhpSQ5bnJb2jtkiig4yc19MVqeJHkwu8Q50K3VXLvdgr90rYXJ0ziuUs/O IAQ5/6xN80xBh/LpoD/4k1QWY/NqWZjy7PS3ruP4gg/gFdjLA3v/5BUZYVQ2tDM/+GI0 jziCakxLHH5FGt44Juo3veE1SiKrm2duZiC1ucVbMYpMVDSDzHksKx4EKqOY0lgradUW wloHqEq9h4e3gU0QhbTR0XNyiq7ECTg5tjManXxpkhGaAahK0r1GNzft9uPyHAlg1kN1 AaS5KLPpeQh6xxaNxAYEOuYxk6IAAHSniIC6aqfFwfz1SUGAm/BZOSDoCw2OK42V3Of9 DYNQ== X-Forwarded-Encrypted: i=1; AJvYcCW2dAIRpt0h94Jep/SxakCAn1UjKdHjNzg4AO12AIS64XzBegHTnG1UliWdykuSpmvzSlFVWmJsi8Q8WVjd@postgresql.org X-Gm-Message-State: AOJu0YxkdW/ruvPKwGjC1PKzRQvBqYjV2Kyp3uXPfew2rzz+NsoKGp1B dE47gJpOEda/R011Ug4SruPG9HjLSHbs7nWqMOIOEVwrIH/td0bXXnqPuXY8FJLGkQ== X-Gm-Gg: ASbGncsDf2+zrYwN4u114+Ak4+MtLE2+JhZjnDQVv9A8rR15pp4OKSAYK8RTWrYrjFu +SdmFvxibNmuSnHi5sY2Dd6iuqudki8C0mi6bZZxMy49Y699cW47kvsc1iSQN+h5j6oMRmS6ABP iujOvg2n9K7BWTxYuVZuWT4an6XsS+9fdOq+2dN95YC9JT2ltYwYU8+p+zIbiGwA5WTJBtNAu9f QqvQ6rORKZ52mSjYBgJWSlXL0OHK9vvaoMlDI1c2IhR0N8H0UD8L0/Uod4BBhOFIuIy7w+pLX68 1h1qwGBaEA+vMGWPK2m3Z1khrNh2VQ+JWaQnaC7qodCKkCS/sfsZ4LT3jrHM/ofkp6xVIN+wvIv CqbNMpo1feaxSyoDysdr9QzJExiVhpCtI7APT21FUseFoMF5zVMX5MTyrutNuvzwlTzG8r48DAQ IcfzMQrUgVJj8= X-Google-Smtp-Source: AGHT+IGTVO+1qHNDMo+pARjOcGwTZ0pSm7beFIt3naUgf79X1InrzTHZj9z+6ntetSjt9jcLgG7rOg== X-Received: by 2002:a17:90b:4f90:b0:32e:7c34:70cf with SMTP id 98e67ed59e1d1-33b513be266mr6722207a91.36.1759974463366; Wed, 08 Oct 2025 18:47:43 -0700 (PDT) Received: from ardentperf.com (97-113-159-222.tukw.qwest.net. [97.113.159.222]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-33b5137de9csm4902203a91.16.2025.10.08.18.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Oct 2025 18:47:42 -0700 (PDT) Date: Wed, 8 Oct 2025 18:47:40 -0700 From: Jeremy Schneider To: David Rowley Cc: Sami Imseih , Nathan Bossart , pgsql-hackers@postgresql.org Subject: Re: another autovacuum scheduling thread Message-ID: <20251008184740.328d45de@ardentperf.com> In-Reply-To: <20251008182520.6e05a8b8@ardentperf.com> References: <20251008164057.6bceb9ed@ardentperf.com> <20251008172727.3befd129@ardentperf.com> <20251008182520.6e05a8b8@ardentperf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 8 Oct 2025 18:25:20 -0700 Jeremy Schneider wrote: > On Thu, 9 Oct 2025 14:03:34 +1300 > David Rowley wrote: > > > I thought if we're to have a priority queue that it would be hard to > > argue against sorting by how far over the given auto-vacuum > > threshold that the table is. If you assume that a table that just > > meets the dead rows required to trigger autovacuum based on the > > autovacuum_vacuum_scale_factor setting gets a priority of 1.0, but > > another table that has n_mod_since_analyze twice over the > > autovacuum_analyze_scale_factor gets priority 2.0. Effectively, > > prioritise by the percentage over the given threshold the table is. > > That way users could still tune things when they weren't happy with > > the priority given to a table by adjusting the corresponding > > reloption. > > If users are tuning this thing then I feel like we've already lost the > battle :) I replied too quickly. Re-reading your email, I think your proposing a different algorithm, taking tuple counts into account. No tunables. Is there a fully fleshed out version of the proposed alternative algorithm somewhere? (one of the older threads?) I guess this is why its so hard to get anything committed in this area... -J