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 1kDIRe-0008Qc-Aj for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Sep 2020 02:24:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kDIRd-0003Qu-3a for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Sep 2020 02:24: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 1kDIRc-0003Ql-Nd for pgsql-hackers@lists.postgresql.org; Wed, 02 Sep 2020 02:24:16 +0000 Received: from mail-il1-x144.google.com ([2607:f8b0:4864:20::144]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kDIRa-0006bv-3o for pgsql-hackers@lists.postgresql.org; Wed, 02 Sep 2020 02:24:15 +0000 Received: by mail-il1-x144.google.com with SMTP id m1so3648494ilj.10 for ; Tue, 01 Sep 2020 19:24:13 -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=kE9vqVly9mPjbv8Lzyg55JIQ1jCIBDyL1RVwz7Hnwc0=; b=AupTWd0bWVQ7HaJDcmOdD5A2SISlLp7rqNL4bIFvXh1IVdsjApgX44XggZIK6Vdb5A 0V5OnNbYyc7RAH6IKNs7Y5ZcNh/2xp73YJIeWrbxafGF1xn61ecyhKH/uU3zEXRUngOa CM23BYWHqc1QdcZJukLVEg3L9NKmOf8qR2MnKeKxjdxEgYfRRxWLepAijq45NfjtTlFQ tMFhCSTfwumcTqgur2V0BKguWCjVFl9yrDafM8ZN18x3HKE92KsTYr7opXb0flwzNm7q 8lcqeNgzb8NP4W+tU+bJm+H0I3fFTjaehhPkohKtErc5aahWUOzIqLNmbXffCp7Wk3rs Nalg== 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=kE9vqVly9mPjbv8Lzyg55JIQ1jCIBDyL1RVwz7Hnwc0=; b=GTOc2NrwETa/24xiBkX18pZXigeN5bTiNaBgmjjn5tQcSzEQLZhntgdLJHBfD0etc8 73NomS5PZHyGX46KAsdEedsxHF8Z8znilLz8OZu+FwnMCs0lQdoHqqzaxOO5QZlyN1o2 1LHzFMn/7RV88MTdiWWOgxGI/J53k7fy8cVdygnhn+Hiv2+0HP4AKS8y4+xJGQLERz6d AmzrB1Ydc4ckldbHYIbbvunxVPMzpoOisefFFMMR4lHiS0ldm/b2U7oy7gYywmRQLdef bfvTZWrnNeJeCv0af1uHs5s75LkcUBk/yytwNzT99A3u3PZNUyDHzgvJGMzkR3eN88GH MQlw== X-Gm-Message-State: AOAM531lfCs4hXqcC/ef1GbuAgUptLr30sJL2+G2T+Sq75KZodXYYWWP C6+JFslZOXkU6K4XilOQhp99ww== X-Google-Smtp-Source: ABdhPJwmwRmCDPoXX85hy7WBkDWpNBF89J04yNDIe29HPNDoN+WWmDqHVAyS9VSCjG/9Q+2F/4YG2w== X-Received: by 2002:a92:c88f:: with SMTP id w15mr1761342ilo.285.1599013453314; Tue, 01 Sep 2020 19:24:13 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id f83sm1513028ilg.9.2020.09.01.19.24.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Sep 2020 19:24:12 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 8A8DB8002D1; Tue, 1 Sep 2020 21:24:10 -0500 (CDT) Date: Tue, 1 Sep 2020 21:24:10 -0500 From: Justin Pryzby To: Michael Paquier Cc: Alvaro Herrera , 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: <20200902022410.GA20149@telsasoft.com> References: <20200901154354.GD5450@telsasoft.com> <20200901154830.GA8891@alvherre.pgsql> <20200902010012.GE1489@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200902010012.GE1489@paquier.xyz> 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, Sep 02, 2020 at 10:00:12AM +0900, Michael Paquier wrote: > On Tue, Sep 01, 2020 at 11:48:30AM -0400, Alvaro Herrera wrote: > > On 2020-Sep-01, Justin Pryzby wrote: > >> The question isn't whether to use a parenthesized option list. I realized that > >> long ago (even though Alexey didn't initially like it). Check 0002, which gets > >> rid of "bool concurrent" in favour of stmt->options&REINDEXOPT_CONCURRENT. > > > > Ah! I see, sorry for the noise. Well, respectfully, having a separate > > boolean to store one option when you already have a bitmask for options > > is silly. > > Yeah, I am all for removing "concurrent" from ReindexStmt, but I don't > think that the proposed 0002 is that, because it is based on the > assumption that we'd want more than just boolean-based options in > those statements, and this case is not justified yet except if it > becomes possible to enforce tablespaces. At this stage, I think that > it is more sensible to just update gram.y and add a > REINDEXOPT_CONCURRENTLY. I also think that it would also make sense > to pass down "options" within ReindexIndexCallbackState() (for example > imagine a SKIP_LOCKED for REINDEX). Uh, this whole thread is about implementing REINDEX (TABLESPACE foo), and the preliminary patch 0001 is to keep separate the tablespace parts of that content. 0002 is a minor tangent which I assume would be squished into 0001 which cleans up historic cruft, using new params in favour of historic options. I think my change is probably incomplete, and ReindexStmt node should not have an int options. parse_reindex_params() would parse it into local int *options and char **tablespacename params. -- Justin