Обсуждение: no entry on pg_database for a live database

Поиск
Список
Период
Сортировка

no entry on pg_database for a live database

От
"Mark Steben"
Дата:

I have a situation I thought was impossible.

 

I have a live postgres database with 4 application tables.  I can access it through PSQL.

But there is no record of this database on the PG_DATABASE catalog table.

And I therefore cannot perform a PG_DUMP backup because it errors with,

You guessed it, ‘No entry on pg_database’  We haven’t done backups

As these are workfile temporary tables. But I’ve primed one of these

Tables with permanent data for performance.

 

I’m running version 7.4.5.   Do I have to do a drop-recreate or is there

Some other way around this?

 

Any ideas would be appreciated

 

Mark Steben

Senior Database Administrator
@utoRevenue™
A Dominion Enterprises Company
480 Pleasant Street
Suite B200
Lee, MA 01238
413-243-4800 Home Office 
413-243-4809 Corporate Fax

msteben@autorevenue.com

Visit our new website at
www.autorevenue.com

 

IMPORTANT: The information contained in this e-mail message is confidential and is intended only for the named addressee(s). If the reader of this e-mail message is not the intended recipient (or the individual responsible for the delivery of this e-mail message to the intended recipient), please be advised that any re-use, dissemination, distribution or copying of this e-mail message is prohibited.  If you have received this e-mail message in error, please reply to the sender that you have received this e-mail message in error and then delete it.  Thank you.

Come Visit Us at NADA!  Booth #5735N
February 9th - February 12th
Moscone Center in San Francisco, CA

 

Re: no entry on pg_database for a live database

От
Tom Lane
Дата:
"Mark Steben" <msteben@autorevenue.com> writes:
> I have a live postgres database with 4 application tables.  I can access it
> through PSQL.
> But there is no record of this database on the PG_DATABASE catalog table.

Try vacuuming pg_database.

If that works, it means your routine vacuuming procedures need some
re-thinking, because they are missing (at least) pg_database.

> I'm running version 7.4.5.

You're doing yourself no favors by failing to update.  The current
release in that branch is 7.4.19.

            regards, tom lane

Re: no entry on pg_database for a live database

От
Shane Ambler
Дата:
Mark Steben wrote:

>
> I'm running version 7.4.5.   Do I have to do a drop-recreate or is there
>
> Some other way around this?
>
>

There has been mention that some of the old versions of 7.x had data
critical issues that are fixed in newer updates.


My first suggestion would be to try it with 7.4.19 (using a copy of your
data files of course)


As well as planning an upgrade to 8.1 or 8.2



--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz

Re: no entry on pg_database for a live database

От
"Mark Steben"
Дата:
Thanks Tom - that did the trick
We will be upgrading to 8.2 within the next couple weeks.

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, January 22, 2008 12:20 PM
To: Mark Steben
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] no entry on pg_database for a live database

"Mark Steben" <msteben@autorevenue.com> writes:
> I have a live postgres database with 4 application tables.  I can access
it
> through PSQL.
> But there is no record of this database on the PG_DATABASE catalog table.

Try vacuuming pg_database.

If that works, it means your routine vacuuming procedures need some
re-thinking, because they are missing (at least) pg_database.

> I'm running version 7.4.5.

You're doing yourself no favors by failing to update.  The current
release in that branch is 7.4.19.

            regards, tom lane


Re: no entry on pg_database for a live database

От
Tom Lane
Дата:
"Mark Steben" <msteben@autorevenue.com> writes:
> Thanks Tom - that did the trick

In that case, you were missing pg_database and probably other system
catalogs too in your vacuuming.

> We will be upgrading to 8.2 within the next couple weeks.

I'd recommend making sure you have vacuumed all system catalogs before
you try to pg_dump, else some of the catalog entries may be invisible
to pg_dump :-(

FWIW, 8.2 should be proof against this type of problem recurring,
because it takes proactive steps to avoid transaction ID wraparound.
7.4 left that up to the DBA ...

            regards, tom lane