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 1l7D6L-00027x-3y for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Feb 2021 08:01:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l7C2v-0007VJ-D9 for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Feb 2021 06:53:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7C2v-0007VB-2s for pgsql-hackers@lists.postgresql.org; Wed, 03 Feb 2021 06:53:49 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l7C2s-0000TK-9z for pgsql-hackers@lists.postgresql.org; Wed, 03 Feb 2021 06:53:48 +0000 Received: by mail-il1-x134.google.com with SMTP id y17so21472438ili.12 for ; Tue, 02 Feb 2021 22:53:45 -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=At70e/G5r5trSGBLS4yXD70BO2tAlqaYqnYawJl7fQQ=; b=K61pyNte6BeG3xKJ9vLl1qx3HMojrHiH9fi+dAm4/82qkfBYTHrlA7IkOhC5foCkAc zyi3EZH1m/xqA69IxsV+KD7FWld6o90d/7mpZAy+cUpHZHrNklqP6lsXv28GoLXJJmJ5 jC9QkK32WnIFSayBdGc9vq3P7qrVZxxmuMLPyADT/tVrnfex0z/POya2lUGWWI4pl3Dl xdaHdwpj7VJO69y5vgkcJbWlZJsVr+shQbR9H/wgGtkiwO5dXAg/tJP7Dqp2xkGvYKmP FNRX8pm/abuca11J179d9c2cbXZvm8KkTAOUimGpI9zrs68HQluOJE6wUesLkggDdUDn P79Q== 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=At70e/G5r5trSGBLS4yXD70BO2tAlqaYqnYawJl7fQQ=; b=Kj046aJtLup9jfDEbo8bhKD1aPtrVSJhgosVbVjl/OJsDkzq7DwunQdUS60Qi+67e1 KL3SzwHeSNZVy3DddbuYAVxw4sdcxDV4BERYv7P17X35jrbxT9mH9enkMd8iH4tvyZOV MiYOstvY0HNRsmszZ8dHK7CrPkVzD+WqVqkL6Ei/9zwzIv+/QuefIWuWj1y0Q/StUVgA SAlUX8CnLes5B8YpDuI4R7j+32gh/Z1yipdYPFZiJhJHIVyyEA39kVIEP9tS530q8WZi VCwnMJi0IIdSRZ/jElXSaeiuU127/K4GGepnfn06KMWzb9Y+8v3ltNAkrBZLzuRuWZhq om2Q== X-Gm-Message-State: AOAM531ZE7tstjAQFhYm3lPCpmMl1lSZptnYMVZWC+VNl5z4dU4wj8Je TVmNqvY3dFyrdEr9gMJZ+gFINg== X-Google-Smtp-Source: ABdhPJxiFAm0r2IEbZmHCwl9/6sq2PUPibVihJZ83gDDuklgXO8zteG1G0IE5GUjKxGks1qWDoI5NA== X-Received: by 2002:a92:6403:: with SMTP id y3mr1552773ilb.72.1612335224369; Tue, 02 Feb 2021 22:53:44 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id w3sm552028ill.80.2021.02.02.22.53.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Feb 2021 22:53:43 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 745A18009DB; Wed, 3 Feb 2021 00:53:42 -0600 (CST) Date: Wed, 3 Feb 2021 00:53:42 -0600 From: Justin Pryzby To: Michael Paquier Cc: Alexey Kondratov , 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: <20210203065342.GX7450@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: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Feb 03, 2021 at 03:37:39PM +0900, Michael Paquier wrote: > index 627b36300c..4ee3951ca0 100644 > --- a/doc/src/sgml/ref/reindex.sgml > +++ b/doc/src/sgml/ref/reindex.sgml > @@ -293,8 +311,30 @@ REINDEX [ ( option [, ...] ) ] { IN > respectively. Each partition of the specified partitioned relation is > reindexed in a separate transaction. Those commands cannot be used inside > a transaction block when working on a partitioned table or index. > + If a REINDEX command fails when run on a partitioned > + relation, and TABLESPACE was specified, then it may not > + have moved all indexes to the new tablespace. Re-running the command > + will rebuild again all the partitions and move previously-unprocessed remove "again" > + indexes to the new tablespace. > + > + > + > + When using the TABLESPACE clause with > + REINDEX on a partitioned index or table, only the > + tablespace references of the partitions are updated. As partitioned indexes I think you should say "of the LEAF partitions ..". The intermediate, partitioned tables are also "partitions" (partitioned partitions if you like). > + are not updated, it is recommended to separately use > + ALTER TABLE ONLY on them to achieve that. Maybe say: "..to set the default tablespace of any new partitions created in the future". -- Justin