From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Indirect indexes |
Date: | 2016-12-07 21:14:00 |
Message-ID: | CA+TgmoY+TDXFc5dh5MS9mp7Cae4u+Rb0LYgdZ8skbQ5r9F9gQw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 21, 2016 at 7:04 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Robert Haas wrote:
>> So, I think that this is a really promising direction, but also that
>> you should try very hard to try to get out from under this 6-byte PK
>> limitation. That seems really ugly, and in practice it probably means
>> your PK is probably going to be limited to int4, which is kind of sad
>> since it leaves people using int8 or text PKs out in the cold.
>
> I think we could just add a new type, unsigned 6 byte int, specifically
> for this purpose. Little in the way of operators, as it's pointless to
> try to do arithmetic with object identifiers. (It'd be similar to UUID
> in spirit, but I wouldn't try to do anything too smart to generate them.)
Sure, we could do that, but that's just band-aiding over the fact that
the index page format isn't really what we want for a feature of this
type.
> Yes, recheck is always needed.
>
> As for vacuum, I was thinking this morning that perhaps the answer to
> that is just to not vacuum the index at all and instead rely on the
> killtuple interface (which removes tuples during scan). So we don't
> need to spend precious maint_work_mem space on a large list of PK
> values.
I don't think that's going to fly. Even if it's the case that
indirect indexes typically need less cleanup than regular indexes, the
idea that there's no command to force a full cleanup short of REINDEX
doesn't sit well with me. It's not difficult to construct realistic
scenarios in which kill_prior_tuple is almost useless (e.g. values are
all marching forward).
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2016-12-07 21:17:51 | Re: Typmod associated with multi-row VALUES constructs |
Previous Message | Andreas Seltenreich | 2016-12-07 21:08:34 | Re: [sqlsmith] Short reads in hash indexes |