Re: how to REINDEX pg_database on

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 20, 2009 at 8:39 AM, Alvaro Herrera wrote:
> Joshua Daniel Franklin escribió:
>> > postgres -P -D /usr/local/databases/pgsql/data pg_database
>> > FATAL:  database "pg_database" does not exist
>>
>> So... does that 'FATAL:  database "pg_database" does not exist' message
>> mean it's game over ?
>
> No, it means you didn't pass the correct parameters.  You need to pass
> the database name, not "pg_database".

I don't understand how to do this. I've read the manual at
http://www.postgresql.org/docs/7.4/interactive/sql-reindex.html
It mentions that "standalone server must be used to repair" system catalogs,
but doesn't give any special instructions to do so.

I tried REINDEX for various databases and it says it's doing something,
but when I try to list the databases or pg_dumpall it says it is empty.
However, as I mentioned earlier if I run a specific SELECT on any of my
user tables I see the data.


$ postgres -P -D /usr/local/databases/pgsql/data template0
backend> reindex database template0;
NOTICE:  table "pg_class" was reindexed
NOTICE:  table "pg_constraint" was reindexed
NOTICE:  table "pg_description" was reindexed
NOTICE:  table "pg_proc" was reindexed
NOTICE:  table "pg_rewrite" was reindexed
NOTICE:  table "pg_statistic" was reindexed
NOTICE:  table "pg_shadow" was reindexed
NOTICE:  table "pg_attrdef" was reindexed
NOTICE:  table "pg_type" was reindexed
NOTICE:  table "pg_attribute" was reindexed
NOTICE:  table "pg_index" was reindexed
NOTICE:  table "pg_operator" was reindexed
NOTICE:  table "pg_opclass" was reindexed
NOTICE:  table "pg_am" was reindexed
NOTICE:  table "pg_amop" was reindexed
NOTICE:  table "pg_amproc" was reindexed
NOTICE:  table "pg_language" was reindexed
NOTICE:  table "pg_aggregate" was reindexed
NOTICE:  table "pg_trigger" was reindexed
NOTICE:  table "pg_cast" was reindexed
NOTICE:  table "pg_namespace" was reindexed
NOTICE:  table "pg_conversion" was reindexed
NOTICE:  table "pg_depend" was reindexed
NOTICE:  table "pg_database" was reindexed
NOTICE:  table "pg_group" was reindexed
NOTICE:  table "pg_inherits" was reindexed
NOTICE:  table "pg_largeobject" was reindexed

....
xbrain_queries=# \d
No relations found.
xbrain_queries=# \l
   List of databases
 Name | Owner | Encoding
------+-------+----------
(0 rows)

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux