Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9ZtS-0002T7-Iw for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Jul 2021 21:18:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m9ZtR-00036X-IV for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Jul 2021 21:18:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9ZtR-00036P-6l for pgsql-hackers@lists.postgresql.org; Fri, 30 Jul 2021 21:18:09 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m9ZtP-0001l0-0D for pgsql-hackers@postgresql.org; Fri, 30 Jul 2021 21:18:08 +0000 Received: by mail-pj1-x1033.google.com with SMTP id nh14so5292723pjb.2 for ; Fri, 30 Jul 2021 14:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=a0n0lx+P7ghfGG60x+GksqDF7Xy2PYxKC8a6y1ma6ns=; b=qduET0MI/lctOgmOWsHGFVAJzbl7pk/pVB3A+HxNZaaO+dGWpTxooXWx/DWLU+Hikv QJlM6U2BZf6jV5xE9vT+V77GdyS2bcpuIXukcww5/fX6SuOTLnP0pGwftXTswZjZWIQB YQ865mSvcZwLxGU9gc/A9VK7q0PQpUBptsjiLEZKcODZANxldzOrzUQJnYt/rKuYqNsr 8NyzxIvv1abYxyXctP2csr8qYU7lIcdf4PRsiTY+WbZsJgye1mfvYZuTBRM2dWcoS5f4 6jlojWLoTz6Y8pDV9ThyV/CZ6Xvzx/girfdvNAnVWmaFAhmltp/l81+GFv2loYna3ItZ 6esw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=a0n0lx+P7ghfGG60x+GksqDF7Xy2PYxKC8a6y1ma6ns=; b=eMXCyiQYrqBJmvzqLX7L37tKiQZbofw/C8qFJHu4JtdNoLnRgyznSbSZerOUBJHEL7 wsT/gOsOa6sTClxcFSzjcIxJ6gKGB0xwRNdcsfLQHyUB+Mu/Km+hQUDBoR6rPPVrIdsl xmtwu9/JPNoSohZ9w+MbOanSe/zsRWiiykgyRl/MyytohG9bEX61FlfctSM1mn2JiXEr /9g910i5Dhmo1hyQyJD0BsMpj4smi+ErDIktzFBYU49adF7Z+IlhI2G4G/hyEhN6umWg T9wMCJKWk1FwaDgzWk4V8RlPyWyn7P++O7YuTjTH/ODa0qEMyRjE4FcJDIAupHP1ob8N 87hQ== X-Gm-Message-State: AOAM531M0qojNtj6wBamKEzMqfAa1jz5IN0t7VEyfFr8fgJCtITgnpWp 5SOANZd1gS/fJi0n7ifOL+qsLQ== X-Google-Smtp-Source: ABdhPJw+ZlxBRa6TY7LC0LxZKwWQLy8Q0szQi5srtR2tFIiE82riKYHm7fNzSFO2CDE3OBAqY9KWqQ== X-Received: by 2002:a17:90a:1109:: with SMTP id d9mr5027078pja.183.1627679885299; Fri, 30 Jul 2021 14:18:05 -0700 (PDT) Received: from jdavis.lan (c-73-231-146-4.hsd1.ca.comcast.net. [73.231.146.4]) by smtp.gmail.com with ESMTPSA id p3sm3292740pjt.0.2021.07.30.14.18.03 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Jul 2021 14:18:04 -0700 (PDT) Message-ID: <87ca2262da500df70f12bb33e992197a0c903094.camel@j-davis.com> Subject: Re: alter table set TABLE ACCESS METHOD From: Jeff Davis To: Michael Paquier Cc: Justin Pryzby , vignesh C , pgsql-hackers@postgresql.org, Jacob Champion , Heikki Linnakangas , Ashwin Agrawal , Ashutosh Sharma , Andres Freund , Robert Haas , Amit Kapila , Alvaro Herrera , Dilip Kumar Date: Fri, 30 Jul 2021 14:18:02 -0700 In-Reply-To: References: <20210716034923.GL20208@telsasoft.com> <20210722094154.GD19620@telsasoft.com> <10785e3e9456a5d761164d3e60d9c4981b80e321.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2021-07-30 at 16:22 +0900, Michael Paquier wrote: > Looking at the past, it was the intention of 05f3f9c7 to go through > the hook even if SET TABLESPACE does not move the relation, so you > are > right that ALTER TABLE is inconsistent to not do the same for LOGGED, > UNLOGGED and ACCESS METHOD if all of them do nothing to trigger a > relation rewrite. > > Now, I am a bit biased about this change and if we actually need it > for the no-op path. If we were to do that, I think that we need to > add in AlteredTableInfo a way to track down if any of those > subcommands have been used to allow the case of rewrite == 0 to > launch > the hook even if these are no-ops. And I am not sure if that's worth > the code complication for an edge case. We definitely should have a > hook call for the case of rewrite > 0, though. It sounds like anything we do here should be part of a larger change to make it consistent. So I'm fine with the patch you posted. Regards, Jeff Davis