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 1koBNS-0002WY-6j for pgsql-hackers@arkaria.postgresql.org; Sat, 12 Dec 2020 20:20:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1koBNR-0001aw-1P for pgsql-hackers@arkaria.postgresql.org; Sat, 12 Dec 2020 20:20:25 +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 1koBNQ-0001ao-R8 for pgsql-hackers@lists.postgresql.org; Sat, 12 Dec 2020 20:20:24 +0000 Received: from mail-il1-x141.google.com ([2607:f8b0:4864:20::141]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1koBNO-00044m-45 for pgsql-hackers@lists.postgresql.org; Sat, 12 Dec 2020 20:20:24 +0000 Received: by mail-il1-x141.google.com with SMTP id 2so12121885ilg.9 for ; Sat, 12 Dec 2020 12:20:21 -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=VkevLCl5Q65mqDbt03EmTkaMGWKWPtLHeUQtRWiwY/U=; b=yGO1ZXgvrLWQBOJjA5Wt/KX5tn3GpaKleoUZLJWNtONnvxxOI4zZIz2EtHd9Ou0TVy mLK9hob+ARBCZuabMgmRY8wtUPShcLEcfhdJpFA6VnLRAegzFfr/2Axn/CdTAhRTd9av RJYhI0/1ZUvajQj4R9A7furd7NRLfjbGNbPkd2chfRkqzalq+P2vzJzHivKPD/3zOtLb sPBRHAh8dsijXH7bGZ5/KLBG8+C2JPSPZZnvftaiOeusChSyUKy0I9D3/SaUNtEgk5q5 C6xs64I2fWPatgqaWincpxq9pIT7hX71GWv2QWc0Kf9L0iS+iuox8OLDJXhmKNZtzb3y j6ww== 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=VkevLCl5Q65mqDbt03EmTkaMGWKWPtLHeUQtRWiwY/U=; b=N+QsMCFFzYrmGw/+aIRNN1p8zoULg5+7fAbUT2JK3EFQPr67Hbm4we4JJM1KpiG+Ma xMUiaZBsSHuZoOW5NPYyEtyIFDoZgeXZUxEstC78Xhm3RbtqxAkhG9bYI0bQ82DAjKYt Su0JcVW4sAlRsWyjVovHlVTrqrRlkEWw9z5+Z+0fmPrzASDxSF4BRNWhTFnyC8Z9iAbg AB4sRJyNOrrnk7/RHwVUa1Z7PCYvVzWLVi0UHUmkc0CkvuSSiX5pVOmalLLX1040sBgC tsFKE9PNhClf5X9xEcJauVs6GpFy42/2RVl4mpbvhmME+F2BTHg1fQ1wOblrKZmHe4qB YIPg== X-Gm-Message-State: AOAM532wCqP//IiXEdd215KLMbdMcm24eGJVVM6RTIDNbSTEMTZbyxq1 RmQ9Qu+//or5SGZT8biQ/SqNQg== X-Google-Smtp-Source: ABdhPJyJx+Rtkjrk011q6f3YcF8UieXyYntHuJhlJN/5xTaj5JbhGij7F7goq4cWaLTzlT/avDxl8g== X-Received: by 2002:a92:874c:: with SMTP id d12mr25320470ilm.244.1607804420222; Sat, 12 Dec 2020 12:20:20 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id d5sm7730941ilf.33.2020.12.12.12.20.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Dec 2020 12:20:19 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 006A1800747; Sat, 12 Dec 2020 14:20:17 -0600 (CST) Date: Sat, 12 Dec 2020 14:20:17 -0600 From: Justin Pryzby To: Peter Eisentraut Cc: Alvaro Herrera , Michael Paquier , Alexey Kondratov , 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: <20201212202017.GF24052@telsasoft.com> References: <20201211202703.GA21264@alvherre.pgsql> <7ec67c56-2377-cd05-51a0-691104404abe@enterprisedb.com> <20201212194526.GE24052@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201212194526.GE24052@telsasoft.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, Dec 12, 2020 at 01:45:26PM -0600, Justin Pryzby wrote: > On Sat, Dec 12, 2020 at 09:20:35AM +0100, Peter Eisentraut wrote: > > On 2020-12-11 21:27, Alvaro Herrera wrote: > > > By the way-- What did you think of the idea of explictly marking the > > > types used for bitmasks using types bits32 and friends, instead of plain > > > int, which is harder to spot? > > > > If we want to make it clearer, why not turn the thing into a struct, as in > > the attached patch, and avoid the bit fiddling altogether. > > I like this. > It's a lot like what I wrote as [PATCH v31 1/5] ExecReindex and ReindexParams > In my v31 patch, I moved ReindexOptions to a private structure in indexcmds.c, > with an "int options" bitmask which is passed to reindex_index() et al. Your > patch keeps/puts ReindexOptions index.h, so it also applies to reindex_index, > which I think is good. > > So I've rebased this branch on your patch. Also, the cfbot's windows VS compilation failed due to "compound literal", which I don't think is used anywhere else. https://ci.appveyor.com/project/postgresql-cfbot/postgresql/build/1.0.120108 src/backend/commands/cluster.c(1580): warning C4133: 'return' : incompatible types - from 'List *' to 'int *' [C:\projects\postgresql\postgres.vcxproj] "C:\projects\postgresql\pgsql.sln" (default target) (1) -> "C:\projects\postgresql\cyrillic_and_mic.vcxproj" (default target) (5) -> "C:\projects\postgresql\postgres.vcxproj" (default target) (6) -> (ClCompile target) -> src/backend/commands/cluster.c(1415): error C2059: syntax error : '}' [C:\projects\postgresql\postgres.vcxproj] src/backend/commands/cluster.c(1534): error C2143: syntax error : missing '{' before '*' [C:\projects\postgresql\postgres.vcxproj] src/backend/commands/cluster.c(1536): error C2371: 'get_tables_to_cluster' : redefinition; different basic types [C:\projects\postgresql\postgres.vcxproj] src/backend/commands/indexcmds.c(2462): error C2059: syntax error : '}' [C:\projects\postgresql\postgres.vcxproj] src/backend/commands/tablecmds.c(1894): error C2059: syntax error : '}' [C:\projects\postgresql\postgres.vcxproj] My fix! patch resolves that. -- Justin