Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 4B1466348DF for ; Mon, 30 Mar 2009 18:34:21 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 22441-10 for ; Mon, 30 Mar 2009 18:34:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sprite.sidhe.org (75-54-192-43.uvs.wlfrct.sbcglobal.net [75.54.192.43]) by mail.postgresql.org (Postfix) with SMTP id 3F65A634228 for ; Mon, 30 Mar 2009 18:34:18 -0300 (ADT) Received: (qmail 28315 invoked by uid 1021); 30 Mar 2009 21:34:17 -0000 Received: from localhost (HELO www.sidhe.org) (127.0.0.1) by sprite.sidhe.org (qpsmtpd/0.33-dev) with SMTP; Mon, 30 Mar 2009 17:34:17 -0400 Received: from 199.172.169.35 (SquirrelMail authenticated user dan) by localhost with HTTP; Mon, 30 Mar 2009 17:34:17 -0400 (EDT) Message-ID: <50477.199.172.169.35.1238448857.squirrel@localhost> In-Reply-To: <20090330212239.GH23023@alvh.no-ip.org> References: <57654.199.172.169.17.1238442145.squirrel@localhost> <56164.199.172.169.17.1238443348.squirrel@localhost> <603c8f070903301313u1a9606a3m27da187b5e376785@mail.gmail.com> <56504.199.172.169.35.1238445194.squirrel@localhost> <20090330203939.GF23023@alvh.no-ip.org> <61646.199.172.169.32.1238446195.squirrel@localhost> <20090330210022.GG23023@alvh.no-ip.org> <51413.199.172.169.17.1238447256.squirrel@localhost> <20090330212239.GH23023@alvh.no-ip.org> Date: Mon, 30 Mar 2009 17:34:17 -0400 (EDT) Subject: Re: Trying to track down weird query stalls From: dan@sidhe.org To: "Alvaro Herrera" Cc: dan@sidhe.org,"Robert Haas" , "Scott Marlowe" , pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.244 tagged_above=0 required=5 tests=AWL=0.144, RDNS_DYNAMIC=0.1 X-Spam-Level: X-Archive-Number: 200903/433 X-Sequence-Number: 33355 > dan@sidhe.org escribió: > >> > So what's the "?" in the query you pasted earlier? >> >> The first ? (for architecture) is 1, the second ? (for branchid) is 0. >> They both should get passed to Postgres as $1 and $2, respectively, >> assuming DBD::Pg does its substitution right. (They're both supposed to >> go >> in as placeholders) > > Right, so how about you reread what I wrote above? > > Oh, hmm, so to be more clear: I don't think DBD::Pg is actually sending > EXECUTE PREPARE. You need to do this over psql. Fair enough. (And sorry about the mis-read) Next time this occurs I'll try and duplicate this in psql. FWIW, a quick read of the C underlying the DBD::Pg module shows it using PQexecPrepared, so I'm pretty sure it is using prepared statements with placeholders, but double-checking seems prudent. -Dan