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 1uShEL-00BqvG-BT for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jun 2025 19:16:53 +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 1uShEI-003qqK-9l for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jun 2025 19:16:50 +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 1uShEH-003qqC-U0 for pgsql-hackers@lists.postgresql.org; Fri, 20 Jun 2025 19:16:50 +0000 Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uShEG-0036Xi-2H for pgsql-hackers@postgresql.org; Fri, 20 Jun 2025 19:16:49 +0000 Received: by mail-il1-x12d.google.com with SMTP id e9e14a558f8ab-3de2bdf3c13so21455925ab.0 for ; Fri, 20 Jun 2025 12:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750447008; x=1751051808; 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=xNFo8ngA5HvaBTc1JOmJTN/eK+FBpW7YyCjuFnYE/Jw=; b=bAku5DPDpQZ2ADa5i6CVCJJCsJPR9ydeNU9IwOwGf19XM8nMnF+AEmFqpma/gc1tLk 5bmwEoUmL7YypOA1XVh9uJ8ED211Kn6lYs0bmBkm20JLbkePQiJGxzQTg92PdZ1ej/8+ 1/QYRAEmuzDGTQYZWw0A8tSkIHoUNgLr0qqeWBDDFipDhSVrMqLeUSzxtQPnaOOhCrD7 K5p+P2PhNeQFyQGU77S+6uEHKGWxP1vpAbinq6X+6f5Y1HnASaH/uerboy+WQ6GTlAJN NcHbSRwhSSUpOCsbbEnIB61j9BXPCtDSCxAx8knlkagwM3BRwkOz9ILW/R9wedgfYeNn 2prA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750447008; x=1751051808; 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=xNFo8ngA5HvaBTc1JOmJTN/eK+FBpW7YyCjuFnYE/Jw=; b=t5lwtDk83mnjEHUrtSVyB0oIgD4kWlEXdhxrJeUHU+kgenc0skqHtnHj78v8OYS1L0 gD5d6cr43cxRbsXyRT53R96GC/SuOfS1gZl6s+xTAWC7K7gJ+XeVwqPULuXpaf2goek4 1dJcZhfwvMwdIrG+9Pe9CsbyBS4ClamuIjs+avGK02i40F3JMz+RxBbDPdunwCJ3/2DS 1kfcpcSmLQllL0007J3Df5IHGy0D25a2o4QtRcOpZymBrnLxt57B88KU7edK0Be2JwKb vMT1lDXbNEibeS9fvsPpeYOji3iJjxt+N6t0w354RB2giviQsw3gBsRPDAsT9AhGQZwZ 4TTw== X-Forwarded-Encrypted: i=1; AJvYcCUv1/JNeWEK1/QG7RlN6YXzmxTl89yVpZsR94vQzEe2faJlN3RqgdSCMPFX26GFvf83UXuMP2uCj+WUlTSC@postgresql.org X-Gm-Message-State: AOJu0YziLdcmK3yhYo7szJr7G9KhqpG5KdOtbzVmS7IOx7mydyTNdG+H 3bhYnaWpCrMMwlh6gO0Tz7RHShxNVT2iS3/16euqP/nRoWtBW+7L6M/6 X-Gm-Gg: ASbGnctImWC8Ahti9MPZLCDmKTCRy8yeIWq+wpKuvgVrPyC7yTzYsQRrW9lnyvPnBj9 02lehS7/8/Gb5iuckCuxn/IFU9jGK/5TOu/B0NSJkzjo1V8P5VxkTpRTlFw/s4jrc2K3dQvQLAf OBYnrEvROSSPtLlhwfoFaNyhziOu3Lo1fAl2LA5qJH+IOXnMV4pWF9pmziLUCDEb81ioAz0oDOB mtUZk9OFF8as1AbreDOsFHdcerEvcww+EMptDOz+bJdQ0mXpsAL8GUvecXp07iGpkRItd1FKi7e pvjErTtgcZHtk3wVv7q0TqYh4L5wSFoyvQuGI/hRSguzZ6vdwnWze9pUeYV6OV7fKk1laiXxcS1 61CJHSkIowD4xFS8hevmuFKVoGpT/pJDgcrYZaBpZewBPCB8Q+wwk X-Google-Smtp-Source: AGHT+IFhq8GG35c36yI02xYY0m+oGwefd243ghA9OKyFt9hJyIyqlx7PmUq+EllpTKWrbzgohi+L2g== X-Received: by 2002:a05:6e02:1a01:b0:3dd:9164:906f with SMTP id e9e14a558f8ab-3de38c33d96mr42937625ab.7.1750447008037; Fri, 20 Jun 2025 12:16:48 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-5019e05051fsm519797173.64.2025.06.20.12.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jun 2025 12:16:47 -0700 (PDT) Date: Fri, 20 Jun 2025 14:16:46 -0500 From: Nathan Bossart To: Michael Paquier Cc: 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: 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 Fri, Jun 20, 2025 at 10:34:19AM +0900, Michael Paquier wrote: > Hmm. I like the simplicity of option 2) for the purpose the back > branches and the post-feature-freeze v18. Yeah, let's do this for now. > However, Option 1) would be my go-to option for HEAD (as of v19 > opening for business), but I think that we should harden the code more > than suggested and treat all VacuumParams as purely input arguments > rather keeping some pointers to it depending on the code path we are > dealing with, so as no callers of these inner routines is surprised by > changes that may happen internally. Hence, reading the code of v2, > I'd suggest to apply the same rule to vacuum_get_cutoffs(), > do_analyze_rel() and heap_vacuum_rel(). Except if I am missing > something, it looks like all these calls should be OK with this new > policy. This implies also changing relation_vacuum() in tableam.h, > which can be a HEAD-only change anyway. Sounds reasonable to me. -- nathan