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 1tvNVI-0048e1-AO for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Mar 2025 21:32:40 +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 1tvNUJ-009bpu-1i for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Mar 2025 21:31:39 +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 1tvNUI-009bpl-P2 for pgsql-hackers@lists.postgresql.org; Thu, 20 Mar 2025 21:31:38 +0000 Received: from mail-yw1-x112d.google.com ([2607:f8b0:4864:20::112d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tvNUH-000Cju-0n for pgsql-hackers@postgresql.org; Thu, 20 Mar 2025 21:31:37 +0000 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-6fee50bfea5so11744327b3.1 for ; Thu, 20 Mar 2025 14:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742506296; x=1743111096; 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=K4nSzxiXstrU/6WEFTycFAFj5SUtRr1bWhqzge+uQP8=; b=AJFHvFAsO1Fq0qc+US/wczmC0rs6VzQCCQ+LKwFjElcmDfv7q7k1iCFkrUghoxRoLn Fr2vbfqy5eDXzW7nYpmRsnOL3k1ZpWj093TaqkPHlzSTOfzgK5pNa+SRMknvvPhKyGCS wESoXQq/o+a1Nr3gEuKBx7ulSC3n6dj9Z1fBRETF8uCZfs/mo/NSJyMA0t3YGepfvUgu 8SV8qtOrcj6m+CmujYpwboW+Y+KPwBLenICs0K4dMHSlmUfiCbNNIL1Km4QLagRgvYNS /490VYytSh7e5C5QPG+Qi/Im0sXxUubdXhtfx8zfPijSUlVkItQD69zcpRf3rm99VWIp BTKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742506296; x=1743111096; 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=K4nSzxiXstrU/6WEFTycFAFj5SUtRr1bWhqzge+uQP8=; b=QaHy/8+JujsWebBjRSIBo6TLrKNAHvX2ML5q02P3D0XToBK7qTptx1QWlrLzQKnaoH zdaU2hoz26xwt40qVZXzizigWqKiQLW2wVi9zn2MKEqcPc//EVBjEUWljexJRjpVA7Cd 6Bn21HZBRkWSHPU1HH5KhkfJS/3omnhSMVrj4WP5doTXQESWAs4DEaY9vzIOlsFEARXF /AKY4hsaWAB1hFGVzjb/caIqYin3VHDPF/JhfgaLrekZofvHNJnTYw6FJ/CNIDcWajUH 0GKVJdkq/x+3aQ5gNXYOfEbbGn+IVckAd5bYKdutK/p/GLYELfI8BsdZiVNBChONfxi3 qR2w== X-Forwarded-Encrypted: i=1; AJvYcCU3pw6m5hCLqMvnTpr9ib195KOBc5/JaXtcvGVs9HzvkjXGM1HUbc02UDYbONd1g1JE6vusB7kkkzUc27ko@postgresql.org X-Gm-Message-State: AOJu0Yzf34IFLLJP8Ou3BDU6uScRUzNqEaeokOB5ckEVeX0fpgo04Ab6 vBKw/ffxGU/XOf+3pFtS6ZMiqOkzRUz9jYR5IRJwIexhyCG7vhpk X-Gm-Gg: ASbGncsC033qg3GB+QUkMy2nyIwpq0RehcLB7I4XKHhHDb+xcNkXnjKs1uFw+Khh5az 68krytYTl5bUyUxgSY82Vfbcbzob9lY7aCbxZvpNhZX63FUSqUlNPyp19wrRdkehYc5zZP4ENKS 6CeaTt/GpjFSxKgPKJTWZTudTlAzFg3i5z6OKdoeX0jOEQoH552fnUTUXVcdQ/UjhTWck5mmxQk mgJeXRMyl7mCZJ8rXVdCULyqbmpTb3A+5TZICRMmpcHF7KWoE1d+jo4nUaF2MBT7Q20FxFrvD4J LjdNc1x/65y8KDK2Le1sGr0KTmWRvpIBJttLLgOHzKIs755JRmP89YDFtfV8JoASivGpudEJLXu DQttxfvvgQFSzdwiSP2fTridjXw8VX39Au7M= X-Google-Smtp-Source: AGHT+IH+c6ldO5XHpz2pyLOSpn4lEMEc0LCcTbTQXCf3/UKg1dsWVRNFYLWv/u0vIM8nHjs8MhOPyA== X-Received: by 2002:a05:6902:2292:b0:e60:9dd3:38c9 with SMTP id 3f1490d57ef6-e66a4d2e233mr953276276.7.1742506296219; Thu, 20 Mar 2025 14:31:36 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e66a442ca99sm84103276.46.2025.03.20.14.31.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Mar 2025 14:31:35 -0700 (PDT) Date: Thu, 20 Mar 2025 16:31:33 -0500 From: Nathan Bossart To: "David G. Johnston" Cc: Fujii Masao , Robert Treat , Laurenz Albe , Gurjeet Singh , Andres Freund , Will Storey , Robert Haas , Postgres Hackers Subject: Re: Disabling vacuum truncate for autovacuum Message-ID: References: <88e3b55a-8ef8-4b53-8d71-6bfde1a07bc1@oss.nttdata.com> 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 Thu, Mar 20, 2025 at 02:18:33PM -0700, David G. Johnston wrote: > So my concern about dump/restore seems to be alleviated but then, why can > we not just do whatever pg_dump is doing to decide whether the current > value for vacuum_truncate is its default (and thus would not be dumped) or > not (and would be dumped)? pg_dump looks at the pg_class.reloptions array directly. In the vacuum code, we look at the pre-parsed rd_options (see RelationParseRelOptions() in relcache.c), which will have already resolved vacuum_truncate to its default value if it was not explicitly set. We could probably look at pg_class.reloptions directly in the vacuum code if we _really_ wanted to, but I felt that putting this information into rd_options was much cleaner. -- nathan