X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6A7E5D1B209 for ; Tue, 22 Jun 2004 13:26:21 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47313-01 for ; Tue, 22 Jun 2004 16:26:17 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8EBFAD1B18F for ; Tue, 22 Jun 2004 13:26:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5MGQ82N018876; Tue, 22 Jun 2004 12:26:08 -0400 (EDT) To: Litao Wu Cc: pgsql-performance@postgresql.org Subject: Re: reindex and copy - deadlock? In-reply-to: <20040622150042.77663.qmail@web13125.mail.yahoo.com> References: <20040622150042.77663.qmail@web13125.mail.yahoo.com> Comments: In-reply-to Litao Wu message dated "Tue, 22 Jun 2004 08:00:42 -0700" Date: Tue, 22 Jun 2004 12:26:08 -0400 Message-ID: <18875.1087921568@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/228 X-Sequence-Number: 7286 Litao Wu 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