From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Amit Langote <amitlangote09(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: ALTER tbl rewrite loses CLUSTER ON index (consider moving indisclustered to pg_class) |
Date: | 2020-02-07 14:39:35 |
Message-ID: | 20200207143935.GP403@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Feb 06, 2020 at 02:24:47PM -0300, Alvaro Herrera wrote:
> 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?
I think the attached is 80% complete (I didn't touch pg_dump).
One objection to this change would be that all relations (including indices)
end up with relclustered fields, and pg_index already has a number of bools, so
it's not like this one bool is wasting a byte.
I think relisclustered was a's clever way of avoiding that overhead (c0ad5953).
So I would be -0.5 on moving it to pg_class..
But I think 0001 and 0002 are worthy. Maybe the test in 0002 should live
somewhere else.
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Update-comment-obsolete-since-b9b8831a.patch | text/x-diff | 1.1 KB |
v1-0002-Give-developer-a-helpful-kick-in-the-pants-if-the.patch | text/x-diff | 1.9 KB |
v1-0003-Make-cluster-a-property-of-table-in-pg_index.patch | text/x-diff | 18.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Emre Hasegeli | 2020-02-07 14:42:39 | Re: In PG12, query with float calculations is slower than PG11 |
Previous Message | Robert Haas | 2020-02-07 14:31:08 | Re: Is custom MemoryContext prohibited? |