From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: ALTER tbl rewrite loses CLUSTER ON index
Date: Thu, 6 Feb 2020 14:24:47 -0300
Message-ID: <20200206172447.GA28041@alvherre.pgsql> (raw)
In-Reply-To: <20200206144426.GH403@telsasoft.com>
On 2020-Feb-06, Justin Pryzby wrote:
> I wondered if it wouldn't be better if CLUSTER ON was stored in pg_class as the
> Oid of a clustered index, rather than a boolean in pg_index.
Maybe. Do you want to try a patch?
> That likely would've avoided (or at least exposed) this issue.
> And avoids the possibility of having two indices marked as "clustered".
> These would be more trivial:
> mark_index_clustered
> /* We need to find the index that has indisclustered set. */
You need to be careful when dropping the index ...
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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@2ndquadrant.com, pryzby@telsasoft.com, amitlangote09@gmail.com
Subject: Re: ALTER tbl rewrite loses CLUSTER ON index
In-Reply-To: <20200206172447.GA28041@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox