Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 751916326E0 for ; Sun, 20 Dec 2009 21:53:20 -0400 (AST) 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 53434-09 for ; Mon, 21 Dec 2009 01:53:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f202.google.com (mail-px0-f202.google.com [209.85.216.202]) by mail.postgresql.org (Postfix) with ESMTP id 2231C632CD4 for ; Sun, 20 Dec 2009 21:53:08 -0400 (AST) Received: by pxi40 with SMTP id 40so3375013pxi.21 for ; Sun, 20 Dec 2009 17:53:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.143.27.2 with SMTP id e2mr4357907wfj.202.1261358680011; Sun, 20 Dec 2009 17:24:40 -0800 (PST) In-Reply-To: <4B2C7A13.9080807@postnewspapers.com.au> References: <4B2267A9.1080302@postnewspapers.com.au> <4B2C7A13.9080807@postnewspapers.com.au> Date: Sun, 20 Dec 2009 17:24:39 -0800 Message-ID: <895e58dd0912201724r6b798469t4879e48a0d0abae2@mail.gmail.com> Subject: Re: Cheapest way to poll for notifications? & Driver improvement question re SSL and notify From: Maciek Sakrejda To: Craig Ringer Cc: PG-JDBC Mailing List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.506 tagged_above=-10 required=5 tests=AWL=0.093, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/65 X-Sequence-Number: 20146 > 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