Re: Dropping a database that does not exist - Mailing list pgsql-general

From Tham Shiming
Subject Re: Dropping a database that does not exist
Date
Msg-id 43EFE5D0.4060607@misatravel.com
Whole thread Raw
In response to Re: Dropping a database that does not exist  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Dropping a database that does not exist  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Well, not exactly support. We didn't create the duplicate databases, it
just appear suddenly out of nowhere, which was also odd.

OK, checking pg_shadow, the usesysid for each entry is unique.
pg_database, however, showed the duplicate databases. A short sample
output from pgAdmin.

datname    datdba
db1        101
db1        101
db2        102
db3        103
db3        103

Whether there is a significance, I am not really sure. Hopefully, one of
you can help us.

None of our code will create a database, and we will not manually create
one unless requirements forces us to do it.

Regards,
Shiming

Tom Lane wrote:
> "Uwe C. Schroeder" <uwe@oss4u.com> writes:
>
>> I don't think you have duplicate databases - that would be the first time I
>> heard that postgreSQL supports that.
>> Are you sure you didn't create the database with a name that just doesn't
>> print?
>>
>
> That's one possibility that I was wondering about; another was there
> somehow being two entries in pg_shadow for the same usesysid, which'd
> result in apparent "duplicate" output from queries that involve joining
> pg_database and pg_shadow.  That's why I wanted to know exactly what
> was leading to the conclusion that there were duplicate databases.
>
>             regards, tom lane
>
>
>


pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: using schema-qualified names in INSERTs
Next
From: Tom Lane
Date:
Subject: Re: Dropping a database that does not exist