Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id DA23E1337C02 for ; Thu, 5 May 2011 12:29:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 83279-07-2 for ; Thu, 5 May 2011 15:29:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id D9BEC1337C0A for ; Thu, 5 May 2011 12:28:48 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 83FC7348046; Thu, 5 May 2011 08:28:42 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AV5uYs62K57o; Thu, 5 May 2011 08:28:40 -0700 (PDT) Received: from perhan.alvh.no-ip.org (unknown [200.85.212.110]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id E1C15348022; Thu, 5 May 2011 08:28:39 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 0A94A6E471; Thu, 5 May 2011 12:28:31 -0300 (CLST) Content-Type: text/plain; charset=UTF-8 Cc: Aleksandr Dushein , pgsql-bugs , Bruce Momjian Subject: Re: BUG #5718: Cannot start postgres (FATAL: invalid cache id: 19) From: Alvaro Herrera To: Tom Lane In-reply-to: <29688.1287593836@sss.pgh.pa.us> References: <201010200944.o9K9i981095017@wwwmaster.postgresql.org> <29688.1287593836@sss.pgh.pa.us> Date: Thu, 05 May 2011 12:28:31 -0300 Message-Id: <1304609194-sup-6618@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.371 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FSL_RU_URL=2.271 X-Spam-Level: X-Archive-Number: 201105/25 X-Sequence-Number: 30164 Excerpts from Tom Lane's message of mié oct 20 13:57:16 -0300 2010: > "Aleksandr Dushein" 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 The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support