Re: ERROR: REINDEX DATABASE: Can be executed only on the currently open database. - Mailing list pgsql-general

From Tom Lane
Subject Re: ERROR: REINDEX DATABASE: Can be executed only on the currently open database.
Date
Msg-id 10780.1081785066@sss.pgh.pa.us
Whole thread Raw
In response to Re: ERROR: REINDEX DATABASE: Can be executed only on the currently open database.  (Clodoaldo Pinto Neto <clodoaldo_pinto@yahoo.com.br>)
List pgsql-general
=?iso-8859-1?q?Clodoaldo=20Pinto=20Neto?= <clodoaldo_pinto@yahoo.com.br> writes:
> [ reasonable-looking VACUUM VERBOSE stats ]

AFAICS those are reasonable-size indexes; REINDEX is unlikely to make
them much smaller.  Since you say you do have foreign keys involved,
that is probably where the problem is.  Check that the data types of
referencing and referenced columns match, and that you have indexes
on the referencing columns.  PG only forces you to have indexes on
the referenced columns, but if you lack the others then deletes require
seqscans through the referencing tables ...

            regards, tom lane

pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Data Encryption in PostgreSQL, and a Tutorial.
Next
From: Guy Fraser
Date:
Subject: Re: COPY TO order