pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kris Jurka <books@ejurka.com>
Cc: Assad Jarrahian <jarraa@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: an efficient way of checking if the connection to a db
Date: Thu, 15 Dec 2005 17:54:21 -0500
Message-ID: <17890.1134687261@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.BSO.4.61.0512151731120.4830@leary.csoft.net>
References: <4bd3e1480512151247u50479082vd08b9a1563d54604@mail.gmail.com>
	<Pine.BSO.4.61.0512151635390.17948@leary.csoft.net>
	<17552.1134685460@sss.pgh.pa.us>
	<Pine.BSO.4.61.0512151731120.4830@leary.csoft.net>

Kris Jurka <books@ejurka.com> writes:
> Testing this with the V2 protocol reveals an issue, but it looks like 
> the server's fault.

> 14:33:42.550 (1)  FE=> Query("")
> 14:33:42.550 (1)  <=BE EmptyQuery

> At this point the driver is waiting for ReadyForQuery, but the server is 
> waiting for another query.

I think you've got a problem on the driver side.
Here, strace'ing a program doing PQexec(conn, "") shows:

17:53:33.677241 send(3, "Q\0\0\0\5\0", 6, 0) = 6
...
17:53:33.678085 recv(3, "I\0\0\0\4Z\0\0\0\5I", 16384, 0) = 11

which looks like EmptyQueryResponse followed by ReadyForQuery to me.

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <17890.1134687261@sss.pgh.pa.us>
Permalink:  ../17890.1134687261@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17890.1134687261@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, books@ejurka.com, jarraa@gmail.com
  Subject: Re: an efficient way of checking if the connection to a db
  In-Reply-To: <17890.1134687261@sss.pgh.pa.us>
  References: <4bd3e1480512151247u50479082vd08b9a1563d54604@mail.gmail.com> <Pine.BSO.4.61.0512151635390.17948@leary.csoft.net> <17552.1134685460@sss.pgh.pa.us> <Pine.BSO.4.61.0512151731120.4830@leary.csoft.net> <17890.1134687261@sss.pgh.pa.us>

* 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