Re: Concurrent CREATE INDEX, try 2 (was Re: Reducing

From: Hannu Krosing <hannu(at)skype(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jochem van Dieten <jochemd(at)gmail(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Concurrent CREATE INDEX, try 2 (was Re: Reducing
Date: 2005-12-06 20:45:31
Message-ID: 1133901931.3719.22.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ühel kenal päeval, T, 2005-12-06 kell 15:38, kirjutas Tom Lane:
> Hannu Krosing <hannu(at)skype(dot)net> writes:
> > What I have in mind would be something like this to get both SNAP2 and
> > commit between any transactions:
>
> > LOOP:
> > LOCK AGAINST STARTING NEW TRANSACTIONS
>
> I can hardly credit that "let's block startup of ALL new transactions"
> is a more desirable restriction than "let's block writers to the table
> we wish to reindex".

If the block is short-time (will be removed one way or other in a few
(tenths of) seconds, then this is much more desirable than blocking
writers for a few hours.

The scenario where concurrent create index command is be needed is 24/7
OLTP databases, which can't be taken down for maintenance. Usully they
can be arranged to tolerate postponing a few transactions for one
second.

----------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-12-06 20:47:10 Re: Ideas for easier debugging of backend problems
Previous Message Tom Lane 2005-12-06 20:41:28 Re: Concurrent CREATE INDEX, try 2 (was Re: Reducing relation locking overhead)