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 1lrAXR-0000IV-2W for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Jun 2021 02:35:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lrAXN-00060n-Rh for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Jun 2021 02:35:17 +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 1lrAXN-0005x7-G7 for pgsql-hackers@lists.postgresql.org; Thu, 10 Jun 2021 02:35:17 +0000 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lrAXG-0001RJ-89 for pgsql-hackers@postgresql.org; Thu, 10 Jun 2021 02:35:16 +0000 Received: by mail-io1-xd2c.google.com with SMTP id q7so25131472iob.4 for ; Wed, 09 Jun 2021 19:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=T5oCJfn2Piw4AoUix+4KJ7zOVIsiVGruS8QlSXw6oPE=; b=yLzeVMn7QSJa9eeUxqWOxHzl0VBpbwWI+vr8mA2PDol/I0sgCYtHqqE31T6XsrU3Z6 XIh3SILQlKEVIb3/A50t1wIjb1HipuYD6fIinNC1ApqkZMT6BbknEsGDMw7RGc10cWP3 ePtRWFMU2iDSi/zIpldFD2VrXjQ3NyjrshDo6jODs19lZfLfpS+tnk475jf9IjBopHp2 OCJDH3nti05I198nN9rYKO5Gjdft4vWjINksGFldPWOQwytWRZvn8tUSWgarDCMRbwDN 69wqX+jltJgpNDhV5++lMh+Hjl4/QQu7VTeqV2dgcthcXL2ZflwHDs7o0Qd9CyMw/0RF gq5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=T5oCJfn2Piw4AoUix+4KJ7zOVIsiVGruS8QlSXw6oPE=; b=BjiIHX34aNYlkRPFt8ohIgkNXwBg8IErMryoTnHQFRdRZQOyJ7mfGxHexRowJ4I33e 0x3gyusjJvOUlDsXuhOlUsFQNPVgMyoGhn4XZMQKwRqQLkpPh72Nnes7bg/raLahf+Qx X3iZ1n9V2J5HNHYKXm+esogYneICfU4LiiAkizDu0KgVzHT6zyJErvxaz3C7CSXLSXnf K8OVQUGDPYOssD8QasVFMRbOhUp5XENghttTL8xhI1O75Eb9jQD81lsXR2cktCDBest7 sAdzkbmOb57D6anCBHRVqDvnuVi6BiP8lg+McuFU0eZxAdiDLxIvcRves2aFIv0d1nyN +qJw== X-Gm-Message-State: AOAM531FLPtr39Kfiul0Otpr1cMXBGMJNFvh8PpJOPLO/Ao/qnW6XKvm dTfqOK2/HnyyzN7lp8uXZixTeQ== X-Google-Smtp-Source: ABdhPJyITDKJq9Zv+7t6SnqsgElPcuFLL+Jm8YDmoLvrfWMyQbk5uBaNFk57y/dwMQ4xCLEvL+Ej0A== X-Received: by 2002:a05:6602:114:: with SMTP id s20mr2033888iot.98.1623292508894; Wed, 09 Jun 2021 19:35:08 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id u8sm960869ilg.43.2021.06.09.19.35.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jun 2021 19:35:08 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 16C82800925; Wed, 9 Jun 2021 21:35:07 -0500 (CDT) Date: Wed, 9 Jun 2021 21:35:06 -0500 From: Justin Pryzby To: Michael Paquier Cc: Jeff Davis , pgsql-hackers@postgresql.org, Jacob Champion , Heikki Linnakangas , Ashwin Agrawal , Ashutosh Sharma , Andres Freund , Robert Haas , Amit Kapila , Alvaro Herrera , Dilip Kumar Subject: Re: alter table set TABLE ACCESS METHOD Message-ID: <20210610023506.GZ16435@telsasoft.com> References: <20210308010707.GA29832@telsasoft.com> <35333ea26e52252174515e14671a9fbc1c20c8fa.camel@j-davis.com> <20210506202305.GQ27406@telsasoft.com> <1033d6b4b5b42a014cc3f617265ae6e61cb5781b.camel@j-davis.com> <20210506221943.GS27406@telsasoft.com> <3bee08c2ca0fab15d14899afcb19490f29e0ec6f.camel@j-davis.com> <803b32e45baf0b05e5f3fc144383db3a18081693.camel@j-davis.com> <27c94b85d966351e2715cdbf79cb4c658b3cfaa7.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jun 09, 2021 at 01:47:18PM +0900, Michael Paquier wrote: > On Tue, Jun 08, 2021 at 05:33:31PM -0700, Jeff Davis wrote: > > New version attached, with the detoasting code removed. Could use > > another round of validation/cleanup in case I missed something during > > the merge. > > This looks rather sane to me, thanks. > > /* Create the transient table that will receive the re-ordered data */ > OIDNewHeap = make_new_heap(tableOid, tableSpace, > + accessMethod > It strikes me that we could extend CLUSTER/VACUUM FULL to support this > option, in the same vein as TABLESPACE. Perhaps that's not something to > implement or have, just wanted to mention it. It's a good thought. But remember that that c5b28604 handled REINDEX (TABLESPACE) but not CLUSTER/VACUUM FULL (TABLESPACE). You wrote: https://www.postgresql.org/message-id/YBuWbzoW6W7AaMv0%40paquier.xyz > Regarding the VACUUM and CLUSTER cases, I am not completely sure if > going through these for a tablespace case is the best move we can do, > as ALTER TABLE is able to mix multiple operations and all of them > require already an AEL to work. REINDEX was different thanks to the > case of CONCURRENTLY. Anyway, as a lot of work has been done here > already, I would recommend to create new threads about those two > topics. I am also closing this patch in the CF app. In any case, I think we really want to have an ALTER .. SET ACCESS METHOD. Supporting it also in CLUSTER/VACUUM is an optional, additional feature. -- Justin