Re: online reindex

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: online reindex
Date: 2003-02-16 19:45:01
Message-ID: 28656.1045424701@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)edu> writes:
> If reindex sets a flag that causes all new inserts and updates to allocate new
> space at the end of the heap without checking for free space, then a simple
> linear scan should be guaranteed to catch all the data.

Oh? If people are inserting tuples at the same time you're reading, I'm
not sure this holds good at all.

> There would only have to be a small window with the table locked while the
> indexes are swapped at the end.

Can you say "deadlock"? Upgrading a lock from shared to exclusive won't
work in general, because there may be other transactions trying to do
the same thing.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-02-16 20:55:57 Re: stats_command_string default?
Previous Message Tom Lane 2003-02-16 19:26:24 Re: stats_command_string default?