Skip site navigation (1) Skip section navigation (2)

Re: Reindex from command line linux

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: FBaron(at)co(dot)belcorp(dot)biz
Cc: Bruno Wolff III <bruno(at)wolff(dot)to>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Reindex from command line linux
Date: 2005-04-22 17:03:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Fri, Apr 22, 2005 at 11:36:46AM -0500, FBaron(at)co(dot)belcorp(dot)biz wrote:
> psql -d Clibelcorpco -c "REINDEX DATABASE Clibelcorpco FORCE"
> ERROR:  REINDEX DATABASE: Can be executed only on the currently open
> database.

If the database name isn't all lowercase then you'll have to quote it.

psql -d Clibelcorpco -c 'REINDEX DATABASE "Clibelcorpco"'

See "Identifiers and Key Words" in the "SQL Syntax" chapter of the
documentation to learn more about quoted identifiers.  See also the
REINDEX documentation and make sure you understand what REINDEX
DATABASE does and doesn't do.  Also, FORCE appears to be obsolete
as of 7.4.

There's also the contrib/reindexdb utility, although I haven't used
it so I don't know how well it works.

Michael Fuhr

In response to

pgsql-admin by date

Next:From: Scott MarloweDate: 2005-04-22 17:03:53
Subject: Re: Another Data directory for second database - feasible?
Previous:From: Tomeh, HusamDate: 2005-04-22 17:03:22
Subject: Re: Another Data directory for second database -

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group