Re: Bugs/slowness inserting and indexing cubes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jay Levitt <jay(dot)levitt(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bugs/slowness inserting and indexing cubes
Date: 2012-02-08 19:23:07
Message-ID: CA+TgmoawOuj1FUq3qyozs8zEd-r0TFEJebRJrSrP-zUWFzgSig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 8, 2012 at 2:15 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jay Levitt <jay(dot)levitt(at)gmail(dot)com> writes:
>> [Posted at Andres's request]
>> TL;DR: Inserting and indexing cubes is slow and/or broken in various ways in
>> various builds.
>
> Not sure yet about most of these, but I know the reason for this one:
>
>> 2. In both 9.1 and 9.2, there is a long delay before CREATE INDEX realizes
>> it can't work on an unlogged table
>
> That error is thrown in gistbuildempty, which is not called until after
> we have finished building the main-fork index.  This is a tad unfriendly
> when the table already contains lots of data.
>
> ISTM there are two ways we could fix this:
>
> 1. Introduce a duplicative test at the start of gistbuild().
>
> 2. Rearrange the order of operations in index_build() so that the init
> fork is made first.
>
> Both of these are kinda ugly, but #2 puts the ugliness into someplace
> that shouldn't have to know about it, and furthermore someplace that's
> unlikely to get reverted if/when gist is fixed to not have this problem.
> So I think I favor #1.  Other opinions anyone?

I don't think I understand your object to #2. It appears to be a
trivial rearrangement?

--
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 Tom Lane 2012-02-08 19:38:37 Re: Bugs/slowness inserting and indexing cubes
Previous Message Tom Lane 2012-02-08 19:15:09 Re: Bugs/slowness inserting and indexing cubes