From: Thomas Kenner <thomas.kenner@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Rename Index - Deadlock
Date: Tue, 16 Mar 2010 10:45:58 +0100
Message-ID: <201003161045.58639.thomas.kenner@gmail.com> (raw)
Hi,
Each day I'm recreating the index my_index of the table my_table. Therefore I
create a new index my_index_new, drop the old index my_index, and rename the
new index:
ALTER INDEX my_index_new RENAME TO my_index;
If an insert or select statement is run at the same time as the "ALTER INDEX
... RENAME TO" statement, it will end up in a deadlock.
The index contains a foreign key (don't know if this information is
important).
Is this a known issue?
Thanks,
Thomas
--
Thomas Kenner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: thomas.kenner@gmail.com
Subject: Re: Rename Index - Deadlock
In-Reply-To: <201003161045.58639.thomas.kenner@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox