Skip site navigation (1) Skip section navigation (2)

Re: reindex and copy - deadlock?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Litao Wu <litaowu(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: reindex and copy - deadlock?
Date: 2004-06-22 16:26:08
Message-ID: 18875.1087921568@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Litao Wu <litaowu(at)yahoo(dot)com> writes:
> I have changed "reindex table my_table" to:
> psql ...
>   -c "drop index my_index; create index my_index;"

> I do not know what caused this happen, and I 
> am also confused. If create index my_index is killed
> by "-9", then my_index should not present in the
> database because it has been dropped before creating.

I believe that the above executes the two commands in a single
transaction.  So if you kill it midway through the CREATE, everything
rolls back and the index is still there.

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Josh BerkusDate: 2004-06-22 16:31:23
Subject: Re: postgresql and openmosix migration
Previous:From: Josh BerkusDate: 2004-06-22 16:23:26
Subject: Re: Hi!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group