Re: [GENERAL] does reindex need exclusive table access?

2011-11-02 Thread Vincent de Phily
On Tuesday 01 November 2011 12:00:33 Craig Ringer wrote: A workaround for reindexing while live is to begin a transaction, create the new index with a new name, drop the old one, rename the new one to the old one, and commit. This only requires an exclusive lock for the period of the drop and

Re: [GENERAL] does reindex need exclusive table access?

2011-11-02 Thread Tom Lane
Vincent de Phily vincent.deph...@mobile-devices.fr writes: The technique kinda works (with some changes) using unique indexes however. Is there a functional difference between a unique index and a primary key index (knowing that my column is not null) ? Or is it just for documentation and

[GENERAL] does reindex need exclusive table access?

2011-10-31 Thread Gauthier, Dave
v8.3.4 on linux. Does reindex table foo require no other users accessing the foo table? Trying to understand why this seems to be stalled when I attempt this on a live DB (if runs fine/fast on a copy of the DB that no one uses). Should I run this inside a transaction? Thanks in Advance !

Re: [GENERAL] does reindex need exclusive table access?

2011-10-31 Thread Craig Ringer
On 01/11/11 02:51, Gauthier, Dave wrote: v8.3.4 on linux. Does reindex table foo require no other users accessing the foo table? Trying to understand why this seems to be stalled when I attempt this on a live DB (if runs fine/fast on a copy of the DB that no one uses). Yes, it

Re: [GENERAL] does reindex need exclusive table access?

2011-10-31 Thread Tom Lane
Craig Ringer ring...@ringerc.id.au writes: On 01/11/11 02:51, Gauthier, Dave wrote: Does reindex table foo require no other users accessing the foo table? Trying to understand why this seems to be stalled when I attempt this on a live DB (if runs fine/fast on a copy of the DB that no one