Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B842DB5DC1D for ; Fri, 9 Sep 2011 12:02:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 15586-02 for ; Fri, 9 Sep 2011 15:02:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 70990B5DBF0 for ; Fri, 9 Sep 2011 12:02:48 -0300 (ADT) 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 p89F2ijj011732; Fri, 9 Sep 2011 11:02:44 -0400 (EDT) To: "Daniel Farina" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6200: standby bad memory allocations on SELECT In-reply-to: <201109082233.p88MXbGE026996@wwwmaster.postgresql.org> References: <201109082233.p88MXbGE026996@wwwmaster.postgresql.org> Comments: In-reply-to "Daniel Farina" message dated "Thu, 08 Sep 2011 22:33:37 +0000" Date: Fri, 09 Sep 2011 11:02:44 -0400 Message-ID: <11731.1315580564@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.089 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504, SARE_MILLIONSOF=0.315 X-Spam-Level: X-Archive-Number: 201109/59 X-Sequence-Number: 31076 "Daniel Farina" writes: > A huge thanks to Conrad Irwin of Rapportive for furnishing virtually all the > details of this bug report. This isn't really enough information to reproduce the problem ... > The occurrence rate is somewhere in the one per tens-of-millions of > queries. ... and that statement is going to discourage anyone from even trying, since with such a low occurrence rate it's going to be impossible to be sure whether the setup to reproduce the problem is correct. So if you'd like this to be fixed, you're either going to need to show us exactly how to reproduce it, or investigate it yourself. The way that I'd personally proceed to investigate it would probably be to change the "invalid memory alloc request size" size errors (in src/backend/utils/mmgr/mcxt.c; there are about four occurrences) from ERROR to PANIC so that they'll provoke a core dump, and then use gdb to get a stack trace, which would provide at least a little more information about what happened. However, if you are only able to reproduce it in a production server, you might not like that approach. Perhaps you can set up an extra standby that's only there for testing, so you don't mind if it crashes? regards, tom lane