From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
To: Glyn Astill <glynastill@yahoo.co.uk>
Subject: Re: Reindexing primary keys without locking
Date: Wed, 01 Jun 2011 08:52:00 -0500
Message-ID: <4DE5FDB0020000250003DF78@gw.wicourts.gov> (raw)
In-Reply-To: <35505.8950.qm@web26008.mail.ukl.yahoo.com>
References: <35505.8950.qm@web26008.mail.ukl.yahoo.com>
Glyn Astill <glynastill@yahoo.co.uk> wrote:
> Does anyone know of any tricks to replace primary key indexes
> without using reindex? Or any other method that will not lock the
> table for an extended amount of time on 8.4?
>
> I've got a bloated primary key index on a table and I'd like to
> try and clean it up without downtime.
You could create a unique index concurrently on the same columns.
Perhaps that would help with performance problems from the bloat
until you had a window to drop the redundant index and reindex the
table?
-Kevin
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-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, glynastill@yahoo.co.uk
Subject: Re: Reindexing primary keys without locking
In-Reply-To: <4DE5FDB0020000250003DF78@gw.wicourts.gov>
* 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