pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dan@sidhe.org
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: dan@sidhe.org,"Robert Haas" <robertmhaas@gmail.com>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Trying to track down weird query stalls
Date: Mon, 30 Mar 2009 17:34:17 -0400 (EDT)
Message-ID: <50477.199.172.169.35.1238448857.squirrel@localhost> (raw)
In-Reply-To: <20090330212239.GH23023@alvh.no-ip.org>
References: <dcc563d10903301238u135d82bpf498c2d40ac31977@mail.gmail.com>
	<57654.199.172.169.17.1238442145.squirrel@localhost>
	<dcc563d10903301247t58bef7cbsd0b6d3bbd1a5e046@mail.gmail.com>
	<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>

> 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



view thread (19+ messages)  latest in thread

Message-ID: <50477.199.172.169.35.1238448857.squirrel@localhost>
Permalink:  ../50477.199.172.169.35.1238448857.squirrel@localhost/
Also on:    postgresql.org/message-id/50477.199.172.169.35.1238448857.squirrel@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: dan@sidhe.org, alvherre@commandprompt.com, robertmhaas@gmail.com, scott.marlowe@gmail.com
  Subject: Re: Trying to track down weird query stalls
  In-Reply-To: <50477.199.172.169.35.1238448857.squirrel@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox