pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Wilford <jwilford@mistral.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: More than one pg_database entry for database
Date: Thu, 05 Jul 2007 10:53:22 -0400
Message-ID: <11565.1183647202@sss.pgh.pa.us> (raw)
In-Reply-To: <BA2CC7B7A60EF64B968B268B500397CB11B2FC@migsexch01.miint.mistral.net>
References: <BA2CC7B7A60EF64B968B268B500397CB11B2FC@migsexch01.miint.mistral.net>

"James Wilford" <jwilford@mistral.net> writes:
> This shows 2 entries for "misp" with different OIDs. Only the first one
> (oid 31238435) exists in the data/base directory. So I tried to delete
> the other row but it doesn't work:

> misp=# DELETE from pg_database where oid = 6790290;
> DELETE 0

That's pretty strange.  I wonder if the index on pg_database.oid is
corrupt.  It certainly seems like the one on datname must be corrupt,
else it should have disallowed two such entries.

You could try deleting the bogus row by selecting it by ctid instead
of oid.  Also see if you can REINDEX pg_database (this will only work
in standalone mode I think).

What PG version is this exactly?

			regards, tom lane



view thread (10+ messages)  latest in thread

Message-ID: <11565.1183647202@sss.pgh.pa.us>
Permalink:  ../11565.1183647202@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11565.1183647202@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jwilford@mistral.net
  Subject: Re: More than one pg_database entry for database
  In-Reply-To: <11565.1183647202@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox