Thread: Canceling REINDEX safe?

Canceling REINDEX safe?

From
"Jan-Peter Seifert"
Date:
Hello,

I wonder whether canceling a REINDEX of a database is safe ( PostgreSQL v9.2.7 ). In the server log there's just the
errormessage that the REINDEX statement has been canceled without details. 
Is the index that has been worked on when canceling okay or can it be incomplete or even get lost?

I don't see anything regarding this:
http://www.postgresql.org/docs/9.2/static/sql-reindex.html

Thank you very much in advance!

Best regards,

Peter


Re: Canceling REINDEX safe?

From
Tom Lane
Date:
"Jan-Peter Seifert" <Jan-Peter.Seifert@gmx.de> writes:
> I wonder whether canceling a REINDEX of a database is safe ( PostgreSQL v9.2.7 ).

Sure.  If it weren't cancel-safe, it wouldn't be crash-safe either.

            regards, tom lane


Re: Canceling REINDEX safe?

From
Shreeyansh Dba
Date:
Hi,
There will be some problem to the index as
REINDEX is a maintenance operation and generally done when index is corrupted, bloated etc.
REINDEX is a locking operation hence it is risky to perform on a busy table,
I suggest in case of index corruption instead of reindexing you can :
create an index concurrently and remove the old index in off peak hours.


Thanks & Regards,
Ajinkya Bangale
Database Administrator
ajinkya.bangale@shreeyansh.com
Office: +919552687400/8400

On Tue, Feb 17, 2015 at 8:43 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Jan-Peter Seifert" <Jan-Peter.Seifert@gmx.de> writes:
> I wonder whether canceling a REINDEX of a database is safe ( PostgreSQL v9.2.7 ).

Sure.  If it weren't cancel-safe, it wouldn't be crash-safe either.

                        regards, tom lane


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin