pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Maciek Sakrejda <msakrejda@truviso.com>
To: Craig Ringer <craig@postnewspapers.com.au>
Cc: PG-JDBC Mailing List <pgsql-jdbc@postgresql.org>
Subject: Re: Cheapest way to poll for notifications? & Driver improvement question re SSL and notify
Date: Sun, 20 Dec 2009 17:24:39 -0800
Message-ID: <895e58dd0912201724r6b798469t4879e48a0d0abae2@mail.gmail.com> (raw)
In-Reply-To: <4B2C7A13.9080807@postnewspapers.com.au>
References: <C746D04C.CAE15%scott_ribe@killerbytes.com>
	<4B2267A9.1080302@postnewspapers.com.au>
	<4B2C7A13.9080807@postnewspapers.com.au>

> So my question is: is there any particularly low-overhead statement that
> might be suitable for generating pointless client/server chat to check for
> received async notifications? Should I just use "SELECT 1" ? Or would I be
> better off using a SHOW statement like "SHOW role" to avoid creating a
> snapshot etc?
>

Does the jdbc driver work with EmptyQueryResponse? At the protocol
level, if you send a Query message with an all-whitespace sql string,
the backend is supposed to reply with a single EmptyQueryResponse
message and then issue ReadyForQuery again. I have a feeling that jdbc
is probably "too smart" for this to work, but it could be worth a
shot.

---
Maciek Sakrejda | Software Engineer | Truviso

1065 E. Hillsdale Blvd., Suite 230
Foster City, CA 94404
(650) 242-3500 Main
(650) 242-3501 F
msakrejda@truviso.com
www.truviso.com



view thread (11+ messages)  latest in thread

Message-ID: <895e58dd0912201724r6b798469t4879e48a0d0abae2@mail.gmail.com>
Permalink:  ../895e58dd0912201724r6b798469t4879e48a0d0abae2@mail.gmail.com/
Also on:    postgresql.org/message-id/895e58dd0912201724r6b798469t4879e48a0d0abae2@mail.gmail.com

 · 

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: msakrejda@truviso.com, craig@postnewspapers.com.au
  Subject: Re: Cheapest way to poll for notifications? & Driver improvement question re SSL and notify
  In-Reply-To: <895e58dd0912201724r6b798469t4879e48a0d0abae2@mail.gmail.com>
  References: <C746D04C.CAE15%scott_ribe@killerbytes.com> <4B2267A9.1080302@postnewspapers.com.au> <4B2C7A13.9080807@postnewspapers.com.au> <895e58dd0912201724r6b798469t4879e48a0d0abae2@mail.gmail.com>

* 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