Re: Reducing relation locking overhead - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Reducing relation locking overhead
Date
Msg-id 20051212140250.GG19555@surnet.cl
Whole thread Raw
In response to Re: Reducing relation locking overhead  (Hannu Krosing <hannu@skype.net>)
List pgsql-hackers
Hannu Krosing wrote:
> Ühel kenal päeval, L, 2005-12-10 kell 21:07, kirjutas Tom Lane:

> >  In any case the design idea here
> > seems to be "we don't care how long REINDEX takes as long as it's not
> > blocking anyone".
> 
> Yes, thats the general idea. 
> 
> Within reason of course, for example making a seqscan over the index for
> each and every tuple inserted during building the first index would
> probably still be too slow :)

You don't need to seqscan the _index_.  You need to scan the table.
Those tuples that do not satisfy the snapshot or where you are in doubt,
you examine the index to see whether they are there.  The bulk of it you
just skip.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_relation_size locking
Next
From: Tom Lane
Date:
Subject: Re: pg_relation_size locking