Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B6CE1B5DBF2 for ; Mon, 26 Sep 2011 13:46:08 -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 89568-07 for ; Mon, 26 Sep 2011 16:46:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id EBF4FB5DBEE for ; Mon, 26 Sep 2011 13:46:01 -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 p8QGjwfF009262; Mon, 26 Sep 2011 12:45:58 -0400 (EDT) To: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) cc: pgsql-bugs@postgresql.org Subject: Re: bug in plancache.c In-reply-to: <20110926101548.8FA8A14A143@mail.netbsd.org> References: <20110926101548.8FA8A14A143@mail.netbsd.org> Comments: In-reply-to yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) message dated "Mon, 26 Sep 2011 10:15:48 -0000" Date: Mon, 26 Sep 2011 12:45:58 -0400 Message-ID: <9261.1317055558@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/187 X-Sequence-Number: 31204 yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) writes: > GetCachedPlan can pass the 'qlist' to the planner twice. > if i understand the code correctly, it's unsafe because the planner is > destructive wrt the input tree. for my application, it often causes > a crash in executor. Good catch, thanks! (But a fix like this really requires a comment IMO.) regards, tom lane