Re: online reindex - Mailing list pgsql-hackers

From Tom Lane
Subject Re: online reindex
Date
Msg-id 28656.1045424701@sss.pgh.pa.us
Whole thread Raw
In response to online reindex  (Greg Stark <gsstark@mit.edu>)
Responses Re: online reindex
List pgsql-hackers
Greg Stark <gsstark@mit.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: stats_command_string default?
Next
From: Tom Lane
Date:
Subject: Re: stats_command_string default?