agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Alexey Kondratov <a.kondratov@postgrespro.ru>
Cc: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>
Cc: Steve Singer <steve@ssinger.info>
Cc: pgsql-hackers@lists.postgresql.org, Robert Haas <robertmhaas@gmail.com>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Jose Luis Tallon <jltallon@adv-solutions.net>
Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
Date: Fri, 4 Dec 2020 16:28:26 -0300
Message-ID: <20201204192826.GA15417@alvherre.pgsql> (raw)
In-Reply-To: <X8nLCFK4Y60UGOJb@paquier.xyz>
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.
view thread (154+ messages) latest in thread
Message-ID: <20201204192826.GA15417@alvherre.pgsql>
Permalink: ../20201204192826.GA15417@alvherre.pgsql/
Also on: postgresql.org/message-id/20201204192826.GA15417@alvherre.pgsql
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, michael@paquier.xyz, peter.eisentraut@enterprisedb.com, pryzby@telsasoft.com, a.kondratov@postgrespro.ru, masahiko.sawada@2ndquadrant.com, steve@ssinger.info, robertmhaas@gmail.com, a.korotkov@postgrespro.ru, sawada.mshk@gmail.com, jltallon@adv-solutions.net
Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly
In-Reply-To: <20201204192826.GA15417@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox