Re: Dropping a database that does not exist

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: "Tham Shiming" <shiming(at)misatravel(dot)com>, "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Dropping a database that does not exist
Date: 2006-02-13 14:50:57
Message-ID: 28447.1139842257@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
>> Tham Shiming <shiming(at)misatravel(dot)com> writes:
>>> 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
>>
>> Does anyone know what the underlying query is that pgadmin uses for
>> this display?

> pgAdmin wouldn't display anything like that unless the user entered the
> query themselves, or did a 'view data' on pg_database (in which case it
> would just be a select *, possibly with a user entered WHERE restriction
> or an ORDER BY).

Hmm. If it's not a join, the only explanation that comes to mind for
phantom rows is transaction ID wraparound. Could we see the output of

select ctid, xmin, xmax, datname from pg_database;

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John D. Burger 2006-02-13 16:18:31 Re: using schema-qualified names in INSERTs
Previous Message sualeh.fatehi 2006-02-13 14:48:59 Re: Database Comparison tool?