Re: BUG #5718: Cannot start postgres (FATAL: invalid cache id: 19)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Aleksandr Dushein <adushein(at)rutube(dot)ru>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: BUG #5718: Cannot start postgres (FATAL: invalid cache id: 19)
Date: 2011-05-05 15:28:31
Message-ID: 1304609194-sup-6618@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Excerpts from Tom Lane's message of mié oct 20 13:57:16 -0300 2010:
> "Aleksandr Dushein" <adushein(at)rutube(dot)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.

This exact symptom was just reported twice in pgsql-es-ayuda. Upgrading
to 9.0.4 fixed the problem. One of them used pg_upgrade from a previous
version, the other one did not. I'm not sure that it's worthwhile to
expore the underlying cause, but it seems clear that pg_upgrade is not
the only possibly guilty party.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-05-05 15:37:09 Re: BUG #5718: Cannot start postgres (FATAL: invalid cache id: 19)
Previous Message Tom Lane 2011-05-05 15:16:23 Re: psql command line client behaviour