Re: unbalanced indexes -> fixed via dump/restore? - Mailing list pgsql-general

From Alfred Perlstein
Subject Re: unbalanced indexes -> fixed via dump/restore?
Date
Msg-id 20010307234355.C18351@fw.wintelcom.net
Whole thread Raw
In response to Re: unbalanced indexes -> fixed via dump/restore?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: unbalanced indexes -> fixed via dump/restore?
List pgsql-general
* Tom Lane <tgl@sss.pgh.pa.us> [010307 14:30] wrote:
> will trillich <will@serensoft.com> writes:
> > A)
> >     pg_dump -c mydb > db.out.sql
> > and then
> >     psql mydb < db.out.sql
> > periodically?
>
> > or is it better to
>
> > B) merely 'reindex' on occasion?
>
> Plain old DROP INDEX / CREATE INDEX is probably the best-trodden path.
> Your (A) seems like vastly more work than is needed.  (B) might be
> marginally easier than DROP/CREATE, but I'm not sure how much I trust
> REINDEX; it's not been around all that long.

Is there a way to do this atomically, meaning so that no one can
get at the table after dropping, but before recreating the index?

lock the table during?

--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]

pgsql-general by date:

Previous
From: "chris markiewicz"
Date:
Subject: length of insert stmt?
Next
From: Tom Lane
Date:
Subject: Re: unbalanced indexes -> fixed via dump/restore?