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 1vE8ho-0064VH-3c for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Oct 2025 16:07:23 +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 1vE8hm-00295h-PS for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Oct 2025 16:07:21 +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.94.2) (envelope-from ) id 1vE8hm-00295Z-Fr for pgsql-hackers@lists.postgresql.org; Wed, 29 Oct 2025 16:07:21 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vE8hj-004PWj-21 for pgsql-hackers@postgresql.org; Wed, 29 Oct 2025 16:07:20 +0000 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-430da72d67bso5921325ab.1 for ; Wed, 29 Oct 2025 09:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761754039; x=1762358839; 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=ZgaYm8jPMSxYkPJzZrjVJea9hvU3J+/oqkRqg8khP5M=; b=inLGhvnyaKOghfXoLtcZIo6F3FY82ZGQPiEUKc4E/dZEVrL66txzAxsggn/GQF8ZZx uczmG9RpW21fvyWwAfRrrY8VNSqv8MvlU8bjE0Djx01nmTi4VauzYSx32x5zNQUytl4B 42GelCmqh5/NpW8kjMKN1fbxYrcAs2DzQEuBJfmZz8WI/mqId4FdextlRtMZgBaqpzgA e9zuWhpG5cTYCb2RYZq1pfA9zVHYbVVIlNOlFMmkAKTUErrv8GOyBV3zCOFcyhIuPEct x4vhMaMQc/wC3QobgL0bz1qAdTwwnOTB4mwwMe7EIK1g4spv+Afyf4UNEDj9evZ8VhWI 56bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761754039; x=1762358839; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZgaYm8jPMSxYkPJzZrjVJea9hvU3J+/oqkRqg8khP5M=; b=fUUBF4zvm2rB0KPbxzJGvZrYrxIGjL62tOUjsFTzeSahs7EgIudWC7FBNoCTUAJ6jS i3RvMB87iLcZURqym/CVWmCpOhQ0lP8LPm35fhpCRQveDJ9Pl6mqRe1Mc2GC2totlFqv OW4rBIQZKzEgl2u5epk6UDqdccgYaKvXJ3KfsdZRBpK1JtzfIEfgIS5IE6bh9jOYrWeR F3eC9TJgJ6VZtXDJ6M9huI1mHFOS2rxDJUHJCrlEPUkuLx69iS5vQhzLu+Yt5ZmDUSIT bGPp7BkvUkL/Ooo3uarakS+AI/SVWLkg/AejNUAYvcfSEgIWdfJXHhVYDDmVqcgTPXP5 lF2g== X-Forwarded-Encrypted: i=1; AJvYcCWc6+B5PYyWjIJ2rroyaKR4xka15xu+G8kcMU6tPiuCow11R1KPVv6+J9jCeVIgm3F960RMqC81UFLuQUt8@postgresql.org X-Gm-Message-State: AOJu0YzkssBecxIJOEnUTaGEBpyuMQW2V+oW9vrZw9KNGVyzwoD37+Sg qZTqaJsOZ2Tj86NEIzEJuKG5A5I/4bD4Vvr5iCj+/eau7O7tWYN0QrHwahhlIg== X-Gm-Gg: ASbGnctjZzi3ybevYUaKZiX/HxFyF1N5xE6F1Lew/uNMvmGhfE40M5e/Bk+/lF39/wQ PgTwBiYgsahbzE5QZlhnVGbKJOTjn9dIlEV0X0GUo28gXJILeDxVy/FaopnYqUBFl8LyWYkWUO+ xHFOs3ynLrMr8ogzo02vj0z4vKjqcmxOC4Z527jje28rSQTzr8o6em/iZnX6bXQyRaAVzMiaPHV Zqy/rSsbVce4bl7aR3lxaHOGgolG4bQOT31bcYIMuhVNHqPn6/k8ge+TDCv5HY4E2XW1aQJv6Gs 1OJQ9zBmjBzR2Mi0zwEzxE/VId3NZYKEyIzH/Ru8h3wcSHGgjCCwaX2o2Av3l7N7BJmiPUMdYo4 h4X1+Z/82XdaJq8S9yRY6hwW2fXiuaXEKdshmWOcnuVV5cngWGfBddnLL+1F4ATFsiIDG2eaPDg i/WHDepZnRp3UnlfxEnM55cOlPnqjgYzELfYUYDxPouH3rTUKsd0Te3vF4qGJn4dZHuw== X-Google-Smtp-Source: AGHT+IH9yqTDrjkz5sV7piOcwb+mzdz7hQvpTKzvnXtVQiVR+N9VeSiRxhX79EZgQ17qMrLFrHhZPQ== X-Received: by 2002:a05:6e02:180e:b0:430:c857:734e with SMTP id e9e14a558f8ab-43301219ac2mr1784375ab.10.1761754038678; Wed, 29 Oct 2025 09:07:18 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-431f6899e76sm57702195ab.34.2025.10.29.09.07.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 09:07:18 -0700 (PDT) Date: Wed, 29 Oct 2025 11:07:16 -0500 From: Nathan Bossart To: Sami Imseih Cc: David Rowley , 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, Oct 29, 2025 at 10:24:17AM -0500, Sami Imseih wrote: > I think we do need some documentation about this behavior, which v6 is > still missing. Would you be interested in giving that part a try? > Another thing I have been contemplating about is the change in prioritization > and the resulting difference in the order in which tables are vacuumed > is what it means for workloads in which autovacuum tuning that was > done with the current assumptions will no longer be beneficial. > > Let's imagine staging tables that get created and dropped during > some batch processing window and they see huge data > ingestion/changes. The current scan will make these less of a priority > naturally in relation to other permanent tables, but with the new priority, > we are making these staging tables more of a priority. Users will now > need to maybe turn off autovacuum on a per-table level to prevent this > scenario. That is just one example. > > What I am also trying to say is should we provide a way, I hate > to say a GUC, for users to go back to the old behavior? or am I > overstating the risk here? It's probably worth testing out this scenario, but I can't say I'm terribly worried. Those kinds of tables are already getting chosen by autovacuum earlier due to reltuples == -1, and this patch will just move them to the front of the list that autovacuum creates. In any case, I'd really like to avoid a GUC or fallback switch here. -- nathan