Re: [ADMIN] More than one pg_database entry for database

2007-07-06 Thread Tom Lane
"James Wilford" <[EMAIL PROTECTED]> writes: > I'd like to try the dump and reload - the only problem is that I can't > use pg_dump because of the error. And I can't rename the entry in > pg_database because my update statement won't match any rows. You can't change the dead entry, but it should wo

Re: [ADMIN] More than one pg_database entry for database

2007-07-06 Thread James Wilford
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane Sent: 05 July 2007 19:17 To: Alvaro Herrera Cc: James Wilford; pgsql-admin@postgresql.org Subject: Re: [ADMIN] More than one pg_database entry for database Alvaro Herrera <[EMAIL PROTEC

Re: [ADMIN] More than one pg_database entry for database

2007-07-05 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> As far as getting out of the situation, the only really good answer is a >> dump and reload. I can't think of any simple way of getting rid of the >> bogus row, but what you should be able to do to let pg_dump work is to >> rename mis

Re: [ADMIN] More than one pg_database entry for database

2007-07-05 Thread Alvaro Herrera
Tom Lane wrote: > "James Wilford" <[EMAIL PROTECTED]> writes: > > It's a redhat version of 7.3 - rh-postgresql-server-7.3.8-2 is the > > package. > > That was obsoleted by Red Hat well over two years ago; you are overdue > for an update. > > >xmin |cmin|xmax| cmax | oid

Re: [ADMIN] More than one pg_database entry for database

2007-07-05 Thread Tom Lane
"James Wilford" <[EMAIL PROTECTED]> writes: > It's a redhat version of 7.3 - rh-postgresql-server-7.3.8-2 is the > package. That was obsoleted by Red Hat well over two years ago; you are overdue for an update. >xmin |cmin|xmax| cmax | oid| ctid | datname > --

Re: [ADMIN] More than one pg_database entry for database

2007-07-05 Thread James Wilford
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: 05 July 2007 17:27 To: James Wilford Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] More than one pg_database entry for database "James Wilford" <[EMAIL PROTECTED]> writes: > Its PG version 7

Re: [ADMIN] More than one pg_database entry for database

2007-07-05 Thread James Wilford
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: 05 July 2007 15:53 To: James Wilford Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] More than one pg_database entry for database "James Wilford" <[EMAIL PROTECTED]> writes: > This shows 2 entr

Re: [ADMIN] More than one pg_database entry for database

2007-07-05 Thread Tom Lane
"James Wilford" <[EMAIL PROTECTED]> 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 though

Re: [ADMIN] More than one pg_database entry for database

2007-07-05 Thread Tom Lane
"James Wilford" <[EMAIL PROTECTED]> 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

[ADMIN] More than one pg_database entry for database

2007-07-05 Thread James Wilford
Hi all, I'm trying to do a pg_dump of my database but I'm getting this error: # pg_dump misp > misp.sql pg_dump: query returned more than one (2) pg_database entry for database "misp" I can connect to the database OK, I just can't dump it. So I connected as postgres to look at the pg_database ta