Thread: VACUUM FULL [ANALYZE] problem

VACUUM FULL [ANALYZE] problem

From
Tim Vadnais
Date:

If I run a vacuum full on my system I get the following warning.  The optional analyze  has no effect on the output.

bwks=# VACUUM FULL;
WARNING:  index "pg_database_datname_index" contains 3 row versions, but table contains 4 row versions
HINT:  Rebuild the index with REINDEX.
WARNING:  index "pg_database_oid_index" contains 3 row versions, but table contains 4 row versions
HINT:  Rebuild the index with REINDEX.

I tried to rebuild the two indexes and got the following error.  The optional FORCE has no effect on the output.

bwks=# reindex index pg_database_oid_index;
ERROR:  shared index "pg_database_oid_index" can only be reindexed in stand-alone mode
bwks=# reindex index pg_database_datname_index;
ERROR:  shared index "pg_database_datname_index" can only be reindexed in stand-alone mode

I tried running 'vacuumdb -full -d bwks' and got the warning messages there as well.

My question is:
What is stand-alone mode?

Thank you,

Tvadnais

Re: VACUUM FULL [ANALYZE] problem

From
Neil Conway
Date:
On Tue, 2004-12-14 at 17:15 -0800, Tim Vadnais wrote:
> My question is:
> What is stand-alone mode?

http://www.postgresql.org/docs/7.4/static/app-postgres.html

-Neil



About reindexing system indexes...

From
Martijn van Oosterhout
Date:
On Tue, Dec 14, 2004 at 05:15:08PM -0800, Tim Vadnais wrote:
> I tried to rebuild the two indexes and got the following error.  The
> optional FORCE has no effect on the output.
>
> bwks=# reindex index pg_database_oid_index;
> ERROR:  shared index "pg_database_oid_index" can only be reindexed in
> stand-alone mode

How difficult would it be for the system to notice this and tag the
index as "to be reindexed". Then, the next time the system is started
up, it can reindexed before starting to accept connections.

It would at least simplify the help in this case to "restart the server
to do the reindexing".

Any thoughts,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

Re: About reindexing system indexes...

From
Christopher Browne
Date:
kleptog@svana.org (Martijn van Oosterhout) writes:
> On Tue, Dec 14, 2004 at 05:15:08PM -0800, Tim Vadnais wrote:
>> I tried to rebuild the two indexes and got the following error.  The
>> optional FORCE has no effect on the output.
>>
>> bwks=# reindex index pg_database_oid_index;
>> ERROR:  shared index "pg_database_oid_index" can only be reindexed in
>> stand-alone mode
>
> How difficult would it be for the system to notice this and tag the
> index as "to be reindexed". Then, the next time the system is started
> up, it can reindexed before starting to accept connections.
>
> It would at least simplify the help in this case to "restart the server
> to do the reindexing".

Part of me wants to ask for the feature:

  "On restart, always re-index all system tables..."

There are, alas, pathological cases where that wouldn't turn out
well...
--
"cbbrowne","@","ca.afilias.info"
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)