Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 519FD1337BA3 for ; Fri, 15 Apr 2011 18:27:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 60032-03 for ; Fri, 15 Apr 2011 21:27:25 +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 476EE1337B4E for ; Fri, 15 Apr 2011 18:27:25 -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 p3FLRMZC007271; Fri, 15 Apr 2011 17:27:22 -0400 (EDT) To: =?utf-8?Q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD_=D0=9A=D1=83=D0=B7=D0=BD=D0=B5=D1=86=D0=BE=D0=B2?= cc: pgsql-bugs@postgreSQL.org Subject: Re: =?utf-8?Q?Re[2]=3A__BUG_#5977=3A_Crash_on_delete_?= In-reply-to: References: <201104130924.p3D9OYVx074761@wwwmaster.postgresql.org> <4602.1302705756@sss.pgh.pa.us> Comments: In-reply-to =?utf-8?Q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD_=D0=9A=D1=83=D0=B7=D0=BD=D0=B5=D1=86=D0=BE=D0=B2?= message dated "Thu, 14 Apr 2011 17:56:17 +0400" Date: Fri, 15 Apr 2011 17:27:22 -0400 Message-ID: <7270.1302902842@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.361 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FSL_RU_URL=2.271, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/116 X-Sequence-Number: 30035 =?utf-8?Q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD_=D0=9A=D1=83=D0=B7=D0=BD=D0=B5=D1=86=D0=BE=D0=B2?= writes: > TRAP: FailesAssertion("!(outerstartsel <= outerendsel)", File: > "costsize.c", String: 1540) On reflection it seems the only way you could get past the preceding "Assert(outer_skip_rows <= outer_rows)" and then crash there would be if outer_path_rows was NaN, which would result in both outerstartsel and outerendsel becoming NaN, and then the comparison would fail to yield true. (A negative value of outer_path_rows would do it too, but that case has been excluded at the top of the function.) So the actual bug is presumably that some other piece of the planner is returning NaN instead of a valid rowcount estimate. Unfortunately, there are a whole lot of places to look, and not nearly enough information here to narrow it down ... regards, tom lane