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 1l6bQC-0007Z5-8b for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Feb 2021 15:47:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l6bQA-0001JG-3v for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Feb 2021 15:47:22 +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 1l6bQ9-0001J6-Nz for pgsql-hackers@lists.postgresql.org; Mon, 01 Feb 2021 15:47:21 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l6bQ5-0005Er-AE for pgsql-hackers@lists.postgresql.org; Mon, 01 Feb 2021 15:47:20 +0000 Received: by mail-il1-x12a.google.com with SMTP id y5so15990488ilg.4 for ; Mon, 01 Feb 2021 07:47:16 -0800 (PST) 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=LPYVQDmLTGXOH59D95EpEwyfhUY6AAjp8nRDVi3MQ2Q=; b=oRDQHHafGVcg018pbkyzjjuLkZ2mLzl5WhD/jLiMIlZCXGGOsOguasVdxscKhfnTlm jTJMusoQ2Czcia4uEFyqni8m3Cx25SQ1fMqxMqZ9Trf+W6xPricYutj+sPf9G5Iyf5Qs A032kf7f7KAuzOHWhYzgFN13MTBAkj2E+k01SXJOEn9lx/bixivqNZFKDg8Y9MpjgC1+ hqSTI7fAYtQuBedgCpMHOySQc9qmb7aiDjaC/WWeFWZYQRvLifIOvU0KZrRFgqsy84+2 yjg3LYcM0lJT5H/2ZT3jaLpxr/D6plxZU/ufZLIwXGWkWlknT8w/OfN8I6ngRzYIv98T 5o9A== 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=LPYVQDmLTGXOH59D95EpEwyfhUY6AAjp8nRDVi3MQ2Q=; b=eK2cGViaEF8+mNpZ8EkIWxEZRnQ+3MARYcf176uin4CHggIvJ8mi3N/mZs8Hs0EI/l MU13/oAIp2zdLFcYnA+w76sMuhmeNFMr7+CdkeAoYoAV3AvgUOkEhCRvsvRDKnFM/HZP eonvNc89hTc1xkUaWSqKs3YCHAeYQMHjGN1uuRfF4mq4vpyAwG4+8h7wv+seQp74mfSA egBDpx4EOQTE5ZhI6kV3zHewfP3aCGoFS0/NxP1xJoJ6N+p4ycuxk10UJTscjPgvL85y JNxK9RKW8mTB2xOOeoYo/2RBKi3mKs/3K/fLIBK2ERwYWWZxcyWnma44mcVlBga4xdLx qprQ== X-Gm-Message-State: AOAM5329IpbOjbanhzGfxijhWKh+tHnYKW3XOx3k0GtrBFcgeR1aaYpr VVkXhCH80sQ2LacoqkYIzxhb8A== X-Google-Smtp-Source: ABdhPJwByNHMhgB6mzGX6wsxjtUtRz9tAaAJzdNxMMaiLNlM5DevhJQEGEPdjKFdaajP5IdewX/KuQ== X-Received: by 2002:a92:870d:: with SMTP id m13mr1412849ild.104.1612194436253; Mon, 01 Feb 2021 07:47:16 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id w3sm2424611ill.80.2021.02.01.07.47.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2021 07:47:15 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 45C1480177F; Mon, 1 Feb 2021 09:47:14 -0600 (CST) Date: Mon, 1 Feb 2021 09:47:14 -0600 From: Justin Pryzby To: Alexey Kondratov Cc: Michael Paquier , Alvaro Herrera , Peter Eisentraut , Masahiko Sawada , Steve Singer , pgsql-hackers@lists.postgresql.org, Robert Haas , Alexander Korotkov , Masahiko Sawada , Jose Luis Tallon Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly Message-ID: <20210201154714.GK7450@telsasoft.com> References: <20210127213658.GA736@alvherre.pgsql> <55c6c1526b94d2caf54c33262fe00674@postgrespro.ru> <1c506564e2a732ec17790bd8c34f042e@postgrespro.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c506564e2a732ec17790bd8c34f042e@postgrespro.ru> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Feb 01, 2021 at 06:28:57PM +0300, Alexey Kondratov wrote: > On 2021-01-30 05:23, Michael Paquier wrote: > > This makes me really wonder if we would not be better to restrict this > > operation for partitioned relation as part of REINDEX as a first step. > > Another thing, mentioned upthread, is that we could do this part of > > the switch at the last transaction, or we could silently *not* do the > > switch for partitioned indexes in the flow of REINDEX, letting users > > handle that with an extra ALTER TABLE SET TABLESPACE once REINDEX has > > finished on all the partitions, cascading the command only on the > > partitioned relation of a tree. I suggest that it'd be un-intuitive to skip partitioned rels , silently requiring a user to also run "ALTER .. SET TABLESPACE". But I think it'd be okay if REINDEX(TABLESPACE) didn't support partitioned tables/indexes at first. I think it'd be better as an ERROR. -- Justin