Re: postgreSQL : duplicate DB names - Mailing list pgsql-general

From Alban Hertroys
Subject Re: postgreSQL : duplicate DB names
Date
Msg-id 631D6B2A-939D-4949-BF25-A013C68D027C@gmail.com
Whole thread Raw
In response to Re: postgreSQL : duplicate DB names  (Khangelani Gama <kgama@argility.com>)
Responses Re: postgreSQL : duplicate DB names
List pgsql-general
On 26 May 2014, at 10:09, Khangelani Gama <kgama@argility.com> wrote:
>> Khangelani Gama, 26.05.2014 09:20:
>>> Hi
>>>
>>> Something wrong happened in our server, for some strange and unknown
>>> reason (s) the server created another DB, there is two same DB names in
>>> one server.
>>>
>>> Name    |  Owner   | Encoding
>>> ---------+----------+----------
>>> a9004    | postgres | UNICODE
>>> a9004    | postgres | UNICODE
>>>
>>
>> Maybe there are some trailing spaces at one of the names.
>>
>> What do you see when you run this:
>>
>> select '"'||datname||'"' as name
>> from pg_database
>>
>> By adding the quotes, you can see if there are any trailing (or leading) in
>> the name.
>>
>> Regards
>> Thomas

> Hi,
>
> I get:
>
>     name
> --------------
> "a9004"
> "template1"
> "template0"
> "a9004"
> (4 rows)

Looks like you might have some index corruption, do those databases have the same oid?:

    select datname, oid from pg_database

What version of the database are you running?
What OS?
Did anything of notice happen on that server before this showed up?

P.S. Please don’t top-post on this list.

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



pgsql-general by date:

Previous
From: Khangelani Gama
Date:
Subject: Re: postgreSQL : duplicate DB names
Next
From: Khangelani Gama
Date:
Subject: Re: postgreSQL : duplicate DB names