Re: BUG #5718: Cannot start postgres (FATAL: invalid cache id: 19) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5718: Cannot start postgres (FATAL: invalid cache id: 19)
Date
Msg-id 29688.1287593836@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5718: Cannot start postgres (FATAL: invalid cache id: 19)  ("Aleksandr Dushein" <adushein@rutube.ru>)
Responses Re: BUG #5718: Cannot start postgres (FATAL: invalid cache id: 19)  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-bugs
"Aleksandr Dushein" <adushein@rutube.ru> writes:
> Description:        Cannot start postgres (FATAL:  invalid cache id: 19)

> Hello. I was upgraded my database from 8.4.4 то 9.0.1 one week ago by
> pg_dump/pg_restore. Yesterday database stop responding with message ERROR:
> database is not accepting commands to avoid wraparound data loss
> I trying to restart in single mode and fail with the same error.

Ugh.  The "invalid cache id" failure is my fault.  You can fix that by
applying this patch to 9.0:
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=c98cd9bdb618794643b670c8240c0aad213340c7
after which you'll probably need to do a manual vacuum with a standalone
backend before the DB will restart.

However, the bigger question is how you got into this state in the first
place.  Even if you'd had autovacuum turned off, it should have
protected you against a wraparound.  I suspect that pg_upgrade is
failing to preserve datfrozenxid and related values properly.  Do you
by any chance still have the 8.4 database available for examination?
Do you have an idea how many transactions you executed since converting?

Bruce: exactly what is pg_upgrade's scheme for getting the right
frozenxid values into the new catalogs, anyway?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #5718: Cannot start postgres (FATAL: invalid cache id: 19)
Next
From: "KOTAPATI.KRISHNAIAH"
Date:
Subject: BUG #5719: Constraint Problem