Обсуждение: Database ... has disappeared from pg_database

Поиск
Список
Период
Сортировка

Database ... has disappeared from pg_database

От
"Jens Hartwig"
Дата:
Hello all,

I am running into a strange error when creating a database which is located
in another directory than the default directory of PostgreSQL (7.0.2.):

I created a directory called mybase (as owner postgres). I ran the command
initlocation on this directory, then I declared an environment variable
PGDATA2 and restarted my postmaster.

With the command createdb mydb -D 'PGDATA2' I created a new database. When
trying to connect to this database I get the following error:

psql: FATAL 1:  Database 'mydb', OID 10857280, has disappeared from
pg_database

What has happened? Any suggestions would be welcome.

Best regards, Jens Hartwig

=============================================
Jens Hartwig
---------------------------------------------
debis Systemhaus GEI mbH
10875 Berlin
Tel.     : +49 (0)30 2554-3282
Fax      : +49 (0)30 2554-3187
Mobil    : +49 (0)170 167-2648
E-Mail   : jhartwig@debis.com
=============================================


Re: Database ... has disappeared from pg_database

От
Jean-Marc Pigeon
Дата:
Bonjour Jens Hartwig
>
> Hello all,
>
> I am running into a strange error when creating a database which is located
> in another directory than the default directory of PostgreSQL (7.0.2.):
[....]
>
>
> psql: FATAL 1:  Database 'mydb', OID 10857280, has disappeared from
> pg_database
>
> What has happened? Any suggestions would be welcome.Is the postgres daemon made awar about it??, we have an
application(Regulus)which data-base is located in its own directory, an extra postgres daemon must be started
like:/usr/bin/postmaster-D //var/lib/regulus/dbm -p 1621 -B512 -o -F -o -Q -o -S2048 
to access it we just do:psql -p 1621 regulus
(it is a matter of fact, for test and and demo purpose, we have 3 or 4 Regulus version running on the same server, eash
one in it own directory and with its own daemon). 
Hopping that help.
>
> Best regards, Jens Hartwig
>
> =============================================
> Jens Hartwig
> ---------------------------------------------
> debis Systemhaus GEI mbH
> 10875 Berlin
> Tel.     : +49 (0)30 2554-3282
> Fax      : +49 (0)30 2554-3187
> Mobil    : +49 (0)170 167-2648
> E-Mail   : jhartwig@debis.com
> =============================================
>


A bientot
==========================================================================
Jean-Marc Pigeon              Internet:   Jean-Marc.Pigeon@safe.ca
SAFE Inc.                Phone: (514) 493-4280  Fax: (514) 493-1946      REGULUS,  a real time accounting/billing
packagefor ISP          REGULUS' Home base <"http://www.regulus.safe.ca"> 
==========================================================================


Re: Database ... has disappeared from pg_database

От
Tom Lane
Дата:
"Jens Hartwig" <jhartwig@debis.com> writes:
> psql: FATAL 1:  Database 'mydb', OID 10857280, has disappeared from
> pg_database

Try vacuuming pg_database.  The code in GetRawDatabaseInfo is not very
good about handling replaced pg_database tuples (I've improved it for
7.1 but that won't help you today).

            regards, tom lane