Re: Minmax indexes

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: Minmax indexes
Date: 2013-09-26 17:00:53
Message-ID: CA+TgmoY1iNBZH826kfYrZUkqe6dsov9ODp1UcCdJBuQOJ+Bprw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 25, 2013 at 4:34 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Here's an updated version of this patch, with fixes to all the bugs
> reported so far. Thanks to Thom Brown, Jaime Casanova, Erik Rijkers and
> Amit Kapila for the reports.

I'm not very happy with the use of a separate relation fork for
storing this data. Using an existing fork number rather than creating
a new one avoids some of them (like, the fact that we loop over all
known fork numbers in various places, and adding another one will add
latency in all of those places, particularly when there is a system
call in the loop) but not all of them (like, what happens if the index
is unlogged? we have provisions to reset the main fork but any others
are just removed; is that OK?), and it also creates some new ones
(like, files having misleading names).

More generally, I fear we really opened a bag of worms with this
relation fork stuff. Every time I turn around I run into a problem
that could be solved by adding another relation fork. I'm not
terribly sure that it was a good idea to go that way to begin with,
because we've got customers who are unhappy about 3 files/heap due to
inode consumption and slow directory lookups. I think we would have
been smarter to devise a strategy for storing the fsm and vm pages
within the main fork in some fashion, and I tend to think that's the
right solution here as well. Of course, it may be hopeless to put the
worms back in the can at this point, and surely these indexes will be
lightly used compared to heaps, so it's not incrementally exacerbating
the problems all that much. But I still feel uneasy about widening
use of that mechanism.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2013-09-26 17:04:16 Extra functionality to createuser
Previous Message Robert Haas 2013-09-26 16:44:28 Re: FW: REVIEW: Allow formatting in log_line_prefix