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 1vMBk0-003Gcd-2o for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Nov 2025 20:58:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vMBjz-0040x1-0z for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Nov 2025 20:58:55 +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.96) (envelope-from ) id 1vMBjz-0040wt-02 for pgsql-hackers@lists.postgresql.org; Thu, 20 Nov 2025 20:58:55 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vMBjx-000bv0-0e for pgsql-hackers@postgresql.org; Thu, 20 Nov 2025 20:58:55 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-59447ca49afso1907736e87.1 for ; Thu, 20 Nov 2025 12:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763672332; x=1764277132; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VT7wCqJTkpRjnRxCBMQjHO3pOWZ1uHDW//7DRaBRvWg=; b=Sy8PYg5IPefTrPgRWgElIexy1Aq13ldUoa8QIA7tiOmHaxAsmXWIxFVpBF/robcbPr 2UXrjLxy9envJHV5y7OwusVrCylyQhe6l5q0eOuCV76oHspVftcqLuDUTqqGl6Q0hRnO UUdwewq/prbFle3lScLI+zW8DIEeZAQOXXJJqXZ+BGNct3tdx0i8mfVvZXpq4D6fscaS J4I/n8mL4YG2QvbMHB/nJ3JpXqYqfXWke8qHfUJ1NR1Jkl8cka+V2B91zd7UyZsOHWqV lELU/pQaHWexqXX9RVC5bfhWatzFwjEyWoiPRcbKI+ReEqgv7ddGDXPsWwDAeXeKaM4A DlJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763672332; x=1764277132; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VT7wCqJTkpRjnRxCBMQjHO3pOWZ1uHDW//7DRaBRvWg=; b=Q+k9oPMd//vjAeAZe0BwOgep7EF0NpnqMcsEfwfxEDnmzdagqYb58RMBAgpuqDOXOP 96s4ljnXaxA5Ei2HOklVU+66EhJLsVLcWlf6yFcNn/cDTI4CnHnnB0a3T0Ng9Rb2QMT4 onI+xmX75IjrGNJNhYmU36D2fWnaeUtEQGM716jAsucjJlpjM7a5yYN3wy6evT1qmOZ+ Moj1MDj94NzI1Anwacvo7UkyhgqVeoGkhTTY2OXjo4hCm9ZDU/ACbR4oCW22QddeqQyB sC0hfjFexB1ujADpprJSfCruvvr6duHD2Zpao0fy8OimVHIJ6+dEeUZ3p35kUjVD2lxR wKDg== X-Forwarded-Encrypted: i=1; AJvYcCWiQ6kJsrviWSi9FpfVB+2I3H6jw5yEo5WG1Ka1sOc5MDQefeGvjdImKz/K5TX74OFpijxHy86Fz4hULRU/@postgresql.org X-Gm-Message-State: AOJu0YxqScPRdOEB1S2d8d7fgtK/++b7ObotzPzZTrR2vpHG2/xmmq9j J9jBonypWTMJhXsjsUNuoyGHnu84vIcI7XwXeZkKC5WsyjF6n5RtjNR2nHk3nC7NvMQtxLCdjOr 5ETminPB2goTIAixq7fDZwp+OzAi40Rk= X-Gm-Gg: ASbGnctNHALw3zwBjqlVXlMxOYlkHALpkHJITSbzMN0ykHVPJbPRE0OsqCWGKF2fk0T PSq+JghnIsXCXuz7rOmHo+e5iBKiqQAKAM+UFFseedTVpF3CraHTZuA1UWMBJkMxjZRBP4+U8yA qbqv8xetYHR3nSBXHLpqADXa3M/DOBjrHI6+0zE0QR6zlUj0p/XlmeRDUVruskkmTrsvzg/l7bA yWVofUt34hlPpDaeGJd+0AtBBdumArZfDQmaGgmiqddlo5308tOUipZqcqViIGvcdRNr2KPr6PP u935y4dqTXdFWqGSB9k8zVgVZhB3GFpYF1DtcpIZKkUPfD5PqY4KTGSgs86C2ehGJ3hw0DZW X-Google-Smtp-Source: AGHT+IEjkluluOsFeOAwCMcwINeonX0xH62BFYbuJDFICecfmPqjM5jXrXn1cGyaUCs7CnxY5kkXZuAu3ltgYkLKTTg= X-Received: by 2002:a05:6512:3d8b:b0:595:7e96:a709 with SMTP id 2adb3069b0e04-5969e2d29efmr1268439e87.10.1763672331298; Thu, 20 Nov 2025 12:58:51 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Fri, 21 Nov 2025 09:58:38 +1300 X-Gm-Features: AWmQ_bnykF7pBZoLbiObWoARrXmG8tDdIDxcIBaatfO2bm5Hh78_AnS4oaOJ3Ok Message-ID: Subject: Re: another autovacuum scheduling thread To: Robert Haas Cc: Sami Imseih , Nathan Bossart , Robert Treat , Jeremy Schneider , pgsql-hackers@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 21 Nov 2025 at 07:36, Robert Haas wrote: > If you want to take more manual control, you can use > the reloption, a choice that you can layer on top of the default > strategy or any of the alternate strategies just proposed. Of course, > making this all too complicated is a recipe for failure, but I suspect > that making it at least somewhat configurable is a good idea. But it is configurable... you're free to change any of autovacuum_freeze_max_age, autovacuum_multixact_freeze_max_age, autovacuum_vacuum_scale_factor, autovacuum_vacuum_insert_scale_factor and autovacuum_analyze_scale_factor, plus all the other autovacuum_vacuum*_threshold GUCs and relptions to adjust the score. The design is no accident. Of course, that does also affect the eligibility for the table to be vacuumed, not just the order, but it's not like there's no way for users to influence the order. If we really do discover that pg_catalog tables need vacuum attention sooner, then maybe we should consider defaulting a reloption for that, or maybe there's only a subset of pg_catalog tables that that matters for. For the record, I don't deny that it is possible that there is some scenario where the pg_class order is better than sorting by the percentage-over-threshold method, but IMO, it seems quite extreme to go adding a series of new reloptions to weight the scores based on no evidence that there's an actual problem or that it's even a good solution to fixing some currently unknown problem. If we later discover there is no issue, then reloptions are quite painful to remove due to pg_dump (or rather failed restores). I think the vacuum options are complex enough without risking adding a few new ones that we don't even know are required or are even useful to anyone. As for the GUC, I think we should at least commit the patch first and add an open item to "Decisions to Recheck Mid-Beta" for v19 to see if anyone still thinks a GUC is a good escape hatch, or if we'd prefer to revert the patch because it's causing trouble. As I see it, we've got about 6 months or maybe a bit more of testing how well this works before we need to make a decision. My vote is to use as much of that time as possible rather than using it to allow people to dream up hypothetical problems that might or might not exist. David