Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U8Uwh-0004p5-Q0 for pgsql-bugs@arkaria.postgresql.org; Thu, 21 Feb 2013 12:08:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U8Uwh-0001nx-91 for pgsql-bugs@arkaria.postgresql.org; Thu, 21 Feb 2013 12:08:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U8Uwg-0001mi-2k for pgsql-bugs@postgresql.org; Thu, 21 Feb 2013 12:08:14 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U8Uwb-0006D8-IR for pgsql-bugs@postgresql.org; Thu, 21 Feb 2013 12:08:12 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 2E94828662; Thu, 21 Feb 2013 04:08:06 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id BA8CBB106A; Thu, 21 Feb 2013 04:05:07 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 7A7C41219CF; Thu, 21 Feb 2013 04:07:22 -0800 (PST) X-Virus-Scanned: amavisd-new at zcs-prod-ext-mta-1.vmware.com Received: from zcs-prod-ext-mta-1.vmware.com ([127.0.0.1]) by localhost (zcs-prod-ext-mta-1.vmware.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LmQQlliCruXP; Thu, 21 Feb 2013 04:07:22 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 4F66D121993; Thu, 21 Feb 2013 04:07:22 -0800 (PST) Received: from [192.168.2.38] (unknown [10.113.62.14]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Thu, 21 Feb 2013 04:07:20 -0800 (PST) Message-ID: <51260D39.5020505@vmware.com> Date: Thu, 21 Feb 2013 14:04:09 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Maciek Sakrejda CC: Daniel Farina , pgsql-bugs@postgresql.org Subject: Re: BUG #7883: "PANIC: WAL contains references to invalid pages" on replica recovery References: <511E4FD1.4000902@vmware.com> <5121ECDD.3000508@vmware.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -4.0 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 19.02.2013 00:19, Maciek Sakrejda wrote: > On Mon, Feb 18, 2013 at 12:57 AM, Heikki Linnakangas< > hlinnakangas@vmware.com> wrote: > >> On 16.02.2013 01:49, Daniel Farina wrote: >> >>> I guess that means Ubuntu (and probably Debian?) libpq-dev breaks >>> PG_VERSION_NUM for PGXS=1. >>> >> >> That obviously needs to be fixed in debian. Meanwhile, Maciek, I'd suggest >> that you build PostgreSQL from sources, install it to some temporary >> location, and then build xlogdump against that. > > That worked, thanks. I have a working xlogdump. Any pointers as to what I > should look for? This is the contents of the pg_xlog directory: > > total 49160 > -rw------- 1 udrehggpif7kft postgres 16777216 Feb 15 00:00 > 000000010000003C00000093 > -rw------- 1 udrehggpif7kft postgres 16777216 Feb 15 00:47 > 000000010000003C00000094 > -rw------- 1 udrehggpif7kft postgres 16777216 Feb 15 00:49 > 000000020000003C00000093 > -rw------- 1 udrehggpif7kft postgres 56 Feb 15 00:49 00000002.history > drwx------ 2 udrehggpif7kft postgres 4096 Feb 15 00:49 archive_status I'd like to see the contents of the WAL, starting from the last checkpoint, up to the point where failover happened. In particular, any actions on the relation base/16385/16430, which caused the error. pg_controldata output on the base backup would also interesting, as well as the contents of backup_label file. How long did the standby run between the base backup and the failover? How many WAL segments? One more thing you could try to narrow down the error: restore from the base backup, and let it run up to the point of failover, but shut it down just before the failover with "pg_ctl stop -m fast". That should create a restartpoint, at the latest checkpoint record. Then restart, and perform failover. If it still throws the same error, we know that the WAL record that touched the page that doesn't exist was after the last checkpoint. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs