From: Scott Marlowe <scott.marlowe@gmail.com>
To: Thomas Kenner <thomas.kenner@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Rename Index - Deadlock
Date: Tue, 16 Mar 2010 10:39:37 -0600
Message-ID: <dcc563d11003160939q56bf00e3p4516c0a98a57dad6@mail.gmail.com> (raw)
In-Reply-To: <201003161045.58639.thomas.kenner@gmail.com>
References: <201003161045.58639.thomas.kenner@gmail.com>
On Tue, Mar 16, 2010 at 3:45 AM, Thomas Kenner <thomas.kenner@gmail.com> wrote:
> 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.
A deadlock or just a lock? What version of pg? What exact error
messages do you get?
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: scott.marlowe@gmail.com, thomas.kenner@gmail.com
Subject: Re: Rename Index - Deadlock
In-Reply-To: <dcc563d11003160939q56bf00e3p4516c0a98a57dad6@mail.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