Re: Reducing relation locking overhead

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Reducing relation locking overhead
Дата
Msg-id 1133601054.2906.713.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Reducing relation locking overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 2005-12-02 at 17:45 -0500, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> > CREATE INDEX uses SnapshotAny, so the scan that feeds the build could
> > easily include rows added after the CREATE INDEX started. When the scan
> > was exhausted we could mark that last TID and return to it after the
> > sort/build.
> 
> And do what?  This has nothing to do with the fundamental problem of
> never being able to catch up unless you can upgrade your lock to exclude
> writes.  What's worse, once you have excluded writes you have to rescan
> the entire table to be sure you haven't missed anything.  So in the
> scenarios where this whole thing is actually interesting, ie enormous
> tables, you're still talking about a fairly long interval with writes
> locked out.  Maybe not as long as a complete REINDEX, but long.

Those are technical difficulties that I believe can be solved.

Greg was right: online index builds are very useful (for us).

Best Regards, Simon Riggs



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Spam 508
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Optimizer oddness, possibly compounded in 8.1