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 1klGkx-0001IX-V2 for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Dec 2020 19:28:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1klGkw-000240-SU for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Dec 2020 19:28:38 +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 1klGkw-00023n-3n for pgsql-hackers@lists.postgresql.org; Fri, 04 Dec 2020 19:28:38 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klGkr-0004ws-2W for pgsql-hackers@lists.postgresql.org; Fri, 04 Dec 2020 19:28:37 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 2AB3D580397; Fri, 4 Dec 2020 14:28:30 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 04 Dec 2020 14:28:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=O8I1tVh+g5+lxdx5s 86UFw2GSUvdIi+2yy57wiS5fW4=; b=IeWqpcTWzsM5c5UWWp7zxrTQ6n5LkZTY5 ICEj9GbJUBk7iigZ1B/B7lb+4u4UgyheQQCezMs/eR5ieYC7vwuyGe4Zua7kzgRt cWEqJeixy5wUeX2NdGG3P2Jdv2pWjNMxazDTmNDWrfm4cCIWhZXfMPAJGMRTMbOv X1GT41OnPPFzzBIvVgBLNdvN8ywF+k3F5TlGZVM/qzJr8IOczHoK6uCENi6riSif GV447J4RMz5RY+1NCLFQwPKdfQT4uUOHTXneUSI4o7bMBZBklb8zgI/edZlOmLQk 2JlppY+LEQ/Q/C/A16MuQpihfqYbsyhbTgXvB1ftZnU5FAzz0mvNw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeikedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtuggjfgesthdtredttdervdenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvefgleevgeeujeeghfegteeghfegheeifeehheelteet ieduieeihffggfehffetnecukfhppeduledtrdelhedrudekrdejleenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.18.79]) by mail.messagingengine.com (Postfix) with ESMTPA id 89D4B1080057; Fri, 4 Dec 2020 14:28:28 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 2D0DB2A14F6; Fri, 4 Dec 2020 16:28:26 -0300 (-03) Date: Fri, 4 Dec 2020 16:28:26 -0300 From: Alvaro Herrera To: Michael Paquier Cc: Peter Eisentraut , Justin Pryzby , 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: <20201204192826.GA15417@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Dec-04, Michael Paquier wrote: > VacuumOption does that since 6776142, and ClusterOption since 9ebe057, > so switching ReindexOption to just match the two others still looks > like the most consistent move. 9ebe057 goes to show why this is a bad idea, since it has this: +typedef enum ClusterOption +{ + CLUOPT_RECHECK, /* recheck relation state */ + CLUOPT_VERBOSE /* print progress info */ +} ClusterOption; and then you do things like + if ($2) + n->options |= CLUOPT_VERBOSE; and then tests like + if ((options & VACOPT_VERBOSE) != 0) Now if you were to ever define third and fourth values in that enum, this would immediately start malfunctioning. FWIW I'm with Peter on this.