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 1vIukW-002abu-1u for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Nov 2025 20:13:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vIukU-007WJO-0r for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Nov 2025 20:13:54 +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 1vIukT-007WJF-37 for pgsql-hackers@lists.postgresql.org; Tue, 11 Nov 2025 20:13:53 +0000 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vIukN-006bGv-1y for pgsql-hackers@postgresql.org; Tue, 11 Nov 2025 20:13:52 +0000 Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-948673fdc47so3089439f.3 for ; Tue, 11 Nov 2025 12:13:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762892027; x=1763496827; 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=bQE3qMKJGc5jC07PtwdLzE6sEBy0f3vJNxKwtDRlYds=; b=QxgrzJp4rTUEVS0IYFcsavch9YL/IDzgywQ3476+uiJ4HnCJfyqzIVvRKEZWxRSjc1 MrAXzdwE8eqHYEf9tMD3gMqO5WMAbNrlO1lT0MpwrSBl3GSED/VFtFP113ua+RFy5idj uuzvFfGyoA9C/wjCRbmDymDpTwNULtqaJXLkMhsNUgLf0plxA2eE2q1qXnaWw5mfEGhE XfJ+uv2VbiUdKpdx+FGG5cG9MT4/9PBZbHQsQtaaXBsQF4hqEWw0EPFxeE/8lidCmsgZ eFjNsAdbUppWgt48lRwBTmX5xEVJCK+qKqiQmdOoVT0Vp5wCchC1bnldJj7qDa3YrAD1 WM6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762892027; x=1763496827; 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=bQE3qMKJGc5jC07PtwdLzE6sEBy0f3vJNxKwtDRlYds=; b=furmWW7Qdo/cooEQoGVLVNg71e3s3qLKzpOl8DSRVU9u9cfT49coIBWad/W8L2pUqS bLWL5k3U/jFKmK5K2SOCVs9dgdUKxD0onA4+N3nRSuWhMvxf5I8k2QNHCBcIsY8UUYFS 3qHruuW6zDrN3Hw90kK/gxeLISbp8WnHDdH905CcM4WoV7mE57Zc0CZN3XNOG+P2QJcI pqQKi9DiHyv7w+98uDbTMRD6JVvi0UeqSPGlWDHRYo5Hk+R8Yif/6+6YzmcQqlBxU9xl H42MzOUYGIMpcmw5wgLJVoXNpG4ZheppV2aHlZiZ1sksGZrsmfuH++AKbk302gArko8d MI+g== X-Forwarded-Encrypted: i=1; AJvYcCWck44qRUh39rh7gr+m4nQuW21w3EjmTO9spbD9xQN31RlnV2qfZok6+Hf7FmDZW79cgQHq64eeNBGJ92D8@postgresql.org X-Gm-Message-State: AOJu0Yxcx7Sxm/ZUYbYu5HULTUvfj/QCkz2BTl6IMfcdpf563WKw5XD9 IecTTZhwXzyw42EeleFk3Y+uPhDz5kM+jrHRjAejG2DJ02QkAMeoQv+5 X-Gm-Gg: ASbGncsUjTLRm8jWgpxHHG212ZB0BV6Xpqmt2jT0XhfgpPZ6tScl4qVoMV/Y7vabWIU hed6k3snoVxTCrKsjZYqXq1gjBw+fwwa74+oE5bnHaRR/6kFBkMWQ/AJGMIIzbY+IogJ3Dhh7rq AS23rgBgJwJZkCTZZynMziHVYMrmn5vUXfs0NGZc8io1RxUk2dHIVSj7DElW5w7eSmAA1CQxklV U8Z6GcQ1E9NuH+jtOYSBruRHLtBTqxwHH4ooQHUGT288FOJvyovtZdSLOq8qcK+89ri5XfTVckY EqeoOdi3LcA/grDLMw0LdqbKD2LLlt2KDjFCbyJjH977orAUHLKtH9iRbZJs5I5K1IAoxvCsBNW U3/3WX6yuLzvJTRXqvdp+JWosOtK+0d7JCN984+kZm2RvA4TIsJUpR7+IhTEg8tEtQG8Js0iYre oXJXveHG7WZHjEy3u5VA0AKVMzd0ioile7CkHGXsztmRh23bDGlGsNoxOQvKSaUvaORQ== X-Google-Smtp-Source: AGHT+IFZazm+/1sgpeBpjVX381WipBsgtkZFwIl3X3uPU8Y4bxtBivlJTvZ0iJcrDExEoEzYdHKGxQ== X-Received: by 2002:a05:6602:2b04:b0:945:ae17:9ae4 with SMTP id ca18e2360f4ac-948c4560275mr95822339f.1.1762892026912; Tue, 11 Nov 2025 12:13:46 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-5b7aaf78f7esm244582173.21.2025.11.11.12.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Nov 2025 12:13:46 -0800 (PST) Date: Tue, 11 Nov 2025 14:13:44 -0600 From: Nathan Bossart To: David Rowley Cc: Sami Imseih , Robert Haas , Jeremy Schneider , pgsql-hackers@postgresql.org Subject: Re: another autovacuum scheduling thread 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 On Wed, Nov 12, 2025 at 09:03:54AM +1300, David Rowley wrote: > I'm still trying to work out what Sami sees in the results that he > doesn't think is good. I resuggested he try coding up the periodic > refresh-the-list code to see if it makes the thing he sees better. I > was hoping that we could get away with not doing that for stage 1 of > this. My concern there is that these change-the-way-autovacuum-works > patches seems to blow up quickly as everyone chips in with autovacuum > problems they want fixed and expect the patch to do it all. +1 > That said, the periodic refresh probably isn't too hard. I suspected > it was something like: > > /* when enough time has passed, refresh the list to ensure the > scores aren't too out-of-date */ > if (time is > lastcheck + autovacuum_naptime * ) > { > list_free_deep(tables_to_process); > goto the_top; > } > } // end of foreach(cell, tables_to_process) My concern is that this might add already-processed tables back to the list, so a worker might never be able to clear it. Maybe that's not a real problem in practice for some reason, but it does feel like a step too far for stage 1, as you said above. -- nathan