2008/2/29, Tom Lane <[EMAIL PROTECTED]>:
> ITAGAKI Takahiro <[EMAIL PROTECTED]> writes:
>  > BTW, why REINDEX requires access exclusive lock? Read-only queries
>  > are forbidden during the operation now, but I feel they are ok
>  > because REINDEX only reads existing tuples. Can we do REINDEX
>  > holding only shared lock on the index?
>
> No.  When you commit the reindex, the old copy of the index will
>  instantaneously disappear; it will not do for someone to be actively
>  scanning that copy.

Can a shared lock be taken at first, and when the new index is ready,
in order to delete the old index, elevate that lock to an exclusive
one?

Markus

-- 
Markus Bertheau
Blog: http://www.bluetwanger.de/blog/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to