Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 6EF443ED9DB for ; Tue, 31 Jan 2012 01:06:12 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs5v2-000779-6A for pgsql-bugs@postgresql.org; Tue, 31 Jan 2012 05:06:12 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q0V55vMV025482; Tue, 31 Jan 2012 00:05:57 -0500 (EST) To: Bridget Frey cc: Robert Haas , Michael Brauwerman , Peter Geoghegan , "pgsql-bugs@postgresql.org" Subject: Re: BUG #6200: standby bad memory allocations on SELECT In-reply-to: <25365.1327985956@sss.pgh.pa.us> References: <23550.1327978836@sss.pgh.pa.us> <1137480939183049761@unknownmsgid> <25365.1327985956@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 30 Jan 2012 23:59:16 -0500" Date: Tue, 31 Jan 2012 00:05:56 -0500 Message-ID: <25481.1327986356@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/265 X-Sequence-Number: 32332 I wrote: > Hm. The stack trace is definitive that it's finding the bad data in a > tuple that it's trying to print to the client, not in an index. BTW, after a bit more reflection it occurs to me that it's not so much that the data is necessarily *bad*, as that it seemingly doesn't match the tuple descriptor that the backend's trying to interpret it with. (In particular, the reported symptom would be consistent with finding a small integer constant at a place where the descriptor expects to find a variable-length field.) So that opens up a different line of thought about how those could get out of sync on a standby. Are you in the habit of issuing ALTER TABLE commands to add/delete/change columns on these tables? In fact, is there any DDL whatsoever going on around the time these failures happen? regards, tom lane