REINDEX syntax?

Started by Jean-Christian Imbeaultabout 23 years ago4 messagesgeneral
Jump to latest
#1Jean-Christian Imbeault
jc@mega-bucks.co.jp

I am trying to reindex a database but it seems I'm getting the steps
wrong. According to the docs I have I need to shutdown the postmaster,
start a backend and issue the reindex command on the DB I want to
reindex. But I get an error telling me no DB is open:

[postgres@localhost pgsql]$ postgres -D /usr/local/pgsql/data -O -P TAL
LOG: database system was shut down at 2003-03-03 19:15:04 JST
LOG: checkpoint record is at 0/9630738
LOG: redo record is at 0/9630738; undo record is at 0/0; shutdown TRUE
LOG: next transaction id: 818752; next oid: 436991
LOG: database system is ready

POSTGRES backend interactive interface
$Revision: 1.307.2.1 $ $Date: 2003/01/01 21:57:18 $

backend> Reindex database TAL force;
ERROR: REINDEX DATABASE: Can be executed only on the currently open

Has something changed for 7.3.2?

Thanks,

Jc

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jean-Christian Imbeault (#1)
Re: REINDEX syntax?

Jean-Christian Imbeault <jc@mega-bucks.co.jp> writes:

[postgres@localhost pgsql]$ postgres -D /usr/local/pgsql/data -O -P TAL
backend> Reindex database TAL force;
ERROR: REINDEX DATABASE: Can be executed only on the currently open

I think you need
Reindex database "TAL" force;

regards, tom lane

#3Jean-Christian Imbeault
jc@mega-bucks.co.jp
In reply to: Jean-Christian Imbeault (#1)
Re: REINDEX syntax?

Tom Lane wrote:

I think you need
Reindex database "TAL" force;

You're right. Could that be added to the documentation? I didn't find
any mention that quotes where needed at:

http://www.postgresql.org/docs/view.php?version=7.3&amp;idoc=1&amp;file=sql-reindex.html

Thanks!

Jc

#4scott.marlowe
scott.marlowe@ihs.com
In reply to: Jean-Christian Imbeault (#3)
Re: REINDEX syntax?

On Tue, 4 Mar 2003, Jean-Christian Imbeault wrote:

Tom Lane wrote:

I think you need
Reindex database "TAL" force;

You're right. Could that be added to the documentation? I didn't find
any mention that quotes where needed at:

http://www.postgresql.org/docs/view.php?version=7.3&amp;idoc=1&amp;file=sql-reindex.html

That's because that's not a reindexing issue. It's a capitalization
issue. Postgresql folds to lower case automatically. That is documented,
but much earlier in the documentation.

However, it's not covered in the reference documentation. Should such
things have a section in the reference manual? I.e. should I be able to
just read the reference docs and know this? I would think the reference
manual should have a section on SQL compliance / differences and things
like this. Not in the conversational tone of the User's Manual but in a
more technical documentation type format.

But how would that be organized? What would go in it?