-----Original Message----- From: Tom Lane [mailto:tgl@xxxxxxxxxxxxx] Sent: 05 July 2007 17:27 To: James Wilford Cc: pgsql-admin@xxxxxxxxxxxxxx Subject: Re: [ADMIN] More than one pg_database entry for database "James Wilford" <jwilford@xxxxxxxxxxx> writes: > Its PG version 7.3. Please tell us it's a relatively recent 7.3.x, at least ... > I've just tried all your suggestions and unfortunately I still can't > delete the bogus row. I think I managed to reindex the system tables: Curious. I'd have thought the reindex would fail because of the duplicate datname entries. > And trying ctid didn't work, assuming this syntax is correct: > backend> delete from pg_database where ctid = '(0,37)'; Even more curious. I'm starting to think it's some sort of XID wraparound problem, except if you can see it in SELECT then why doesn't the DELETE see it? Could you show all the system columns of pg_database, viz select xmin, cmin, xmax, cmax, oid, ctid, datname from pg_database; regards, tom lane It's a redhat version of 7.3 - rh-postgresql-server-7.3.8-2 is the package. Here's the system colums: misp=# select xmin, cmin, xmax, cmax, oid, ctid, datname from pg_database; xmin | cmin | xmax | cmax | oid | ctid | datname ----------+------------+------------+------+----------+--------+-------- --- 2 | 2304646034 | 2304646034 | 0 | 9019080 | (0,3) | webstats 2 | 0 | 0 | 0 | 21676718 | (0,4) | webstats 2 | 0 | 0 | 0 | 1 | (0,6) | template1 2 | 0 | 0 | 0 | 16975 | (0,7) | template0 2 | 2425306827 | 2425306827 | 0 | 15062595 | (0,16) | misp_jon2 2 | 0 | 0 | 0 | 25823532 | (0,19) | misptest 2 | 0 | 0 | 0 | 3988824 | (0,23) | devices 45097349 | 0 | 0 | 0 | 30149940 | (0,26) | status 59253569 | 0 | 0 | 0 | 30153251 | (0,27) | mispcopy 59254726 | 0 | 0 | 0 | 31238435 | (0,28) | misp 2 | 2430588419 | 2430588419 | 0 | 6790290 | (0,37) | misp 2 | 2425306819 | 2425306819 | 0 | 7511185 | (0,38) | misp_jon (12 rows) The "webstats" database also appears twice, although we're more concerned about "misp" at the moment. James