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 1w5nFe-003dSv-0G for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 16:08:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5nFc-003hOs-1c for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 16:08:04 +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 1w5nFb-003hOH-38 for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 16:08:04 +0000 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w5nFT-00000001ACB-3nKn for pgsql-hackers@postgresql.org; Thu, 26 Mar 2026 16:08:03 +0000 Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-7d751ef36ccso635231a34.0 for ; Thu, 26 Mar 2026 09:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774541275; x=1775146075; 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=6Gbw5zIQnJSSROxm6rcd4FZajvthWhGPrmLzZNsR2I4=; b=c3GWPOwYsMazXHXrLaG/CZUnep+u3G+MJGsU+EazNymfHLAcBfdcDNrgkFPhQGDUF+ Bq9NS0SOO++2v33XGlTFgxuXBvnjOdzFIb2AXO8HLJ3P+sJjoCxjnxEJxFod986ebIYw FtYYriYAjkcPPldVqMXmNkwYs2utAxRSm5RxxFmoKrNY4jWNnvKUoBDBKgKxJ7jAwEj6 MQ9wu+Fmt2vocWNy8ikwbquIGngUBMPTb2Ihfju0dxLtAdFEYjxrpYnayTtCdIAzKqTk rlMeYBVRCrvHm2P9iRDZu/GbFDSTVTiSBN9y6xbx6G5NvYX+lwcea+gMmay5wikrlnkB 85gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774541275; x=1775146075; 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=6Gbw5zIQnJSSROxm6rcd4FZajvthWhGPrmLzZNsR2I4=; b=CiiThbF+Nm4uBT3gPftPq48CL57aoQ4XuGUBRFHy1JmQEEm1Z58klCaFXxZlxyF0ta lk9WQJclKwRJZGj/Rf0sjAd041BYCtUmyvINTyHNevj1/y8X13joL2T/RWGKxTnn/dTc nSQJczHsXjezYsAXZ++1/A7v63NZCH2HsK6vlNDqBb7PqgxkxXin3T+xI7KJ00oZxoF7 AYN9+M7TcmDmNH98IWfnBl2XWcvks/ZVcuRMTUxpQnwJgI5JXjYH72O5VrtatOPU9xP6 KW8CV+Btch12TQVkA6k3CvdMj8XZffX+9cLjBpiGI6/HdQr+xUfqzJgwdrOTImRFpPc+ +ohg== X-Forwarded-Encrypted: i=1; AJvYcCVT2E3c186VJknJlUAwxAS+FTaa+757+dtcpfZz0W0S58bLoOe7IKHV+o1U2CyJhEj+n1x/tteV3KmBbMMA@postgresql.org X-Gm-Message-State: AOJu0Yy2Jc6Oueoq5yxKiuAG/tgg1DAySUe4zejhY/ewTxvsCXOgyPXC WBg0yo/ki86LXpi2tjQYJTj6g6ZZN6IB4Zh3qUnMuPhbR6cuK0E0ybyR X-Gm-Gg: ATEYQzz6JoBy7fjKGZxRNSRsSkjWOoOdMNwk7Na1LQMDljsWOWwHzRRb9HuL5xYqU5v /tuHZI9liBUPZ0NlTYskIK0v845GboMbN/2UfhmyoWmlNyLuR0dg94/f/7yRyHPaMQCUkomA0PC 81K6NriLXyyxHBPuHZzDj0aCQ/XzKQXxIF92V412ivhhtIttUfJnyvZ74W+8ZltQ4oOmutUBXHr IwD6L54PPn2p02ymiv8QFK9shjdKzyszwyp/xfnh3h7wU8npl+4I8XV6CAMEhvuDjRHxRFqn5Vk ksRRD2hDoGmdhS7HA+OR7q6FUY+wnErex6tlAQSVrUBb/c4M4tdrv3AufyRPdRR4X4AmIIZIGCI zQKS6DRkWGDEHCMVh5hbdNteg7dgUG8Z47mwAwxLWi400DS30ypATYcfQ+xhgiTSGP3JmJJPppo iw2HhExZGoHUXBme9+6dlO1fGGB7Y2bqR+FF64h1crG3Pp3PSFzv74WV8nxaciO0CplTkMMLley 4smILI2omkrESQzkCx5Lw== X-Received: by 2002:a05:6830:82a5:b0:7d7:ecef:1460 with SMTP id 46e09a7af769-7d9d69e26b6mr4590981a34.31.1774541275258; Thu, 26 Mar 2026 09:07:55 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d9e701545bsm2597933a34.11.2026.03.26.09.07.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2026 09:07:54 -0700 (PDT) Date: Thu, 26 Mar 2026 11:07:52 -0500 From: Nathan Bossart To: Michael Paquier Cc: Andres Freund , shihao zhong , PostgreSQL-development Subject: Re: Fixes inconsistent behavior in vacuum when it processes multiple relations Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Ca6sfZgjkQSqww2W" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Ca6sfZgjkQSqww2W Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 26, 2026 at 11:22:25AM +0900, Michael Paquier wrote: > Once vacuum_rel() has its VacuumParams changed to a pointer, renaming > it to params_local and use params_local in all its code paths looks > sensible. On top of what you are doing, I would add a big warning > comment at the top of the routine to mention that "params" should not > be used directly in the routine. The local copies should be used. Wait... Can't we just pass params by value only to vacuum_rel()? Doesn't this accomplish what we need? -- nathan --Ca6sfZgjkQSqww2W Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v3-0001-avoid-including-vacuum.h-in-tableam.h-and-heapam..patch