Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 2C4BD2E0048 for ; Wed, 27 Feb 2008 03:57:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 24238-05 for ; Wed, 27 Feb 2008 03:57:14 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ikoffice.de (ikoffice.de [81.169.166.92]) by postgresql.org (Postfix) with ESMTP id 9D6C52E0043 for ; Wed, 27 Feb 2008 03:57:17 -0400 (AST) Received: from p5481e7e2.dip.t-dialin.net ([84.129.231.226] helo=[192.168.1.16]) by ikoffice.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1JUHA8-0005PY-E6; Wed, 27 Feb 2008 08:57:13 +0100 Message-ID: <47C517D9.9020405@ikoffice.de> Date: Wed, 27 Feb 2008 08:57:13 +0100 From: Daniel Migowski User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Oliver Jowett CC: pgsql-jdbc@postgresql.org Subject: Re: Fastest way to check aliveness of connection References: <47C415F8.2020406@ikoffice.de> <47C490A8.1090708@opencloud.com> In-Reply-To: <47C490A8.1090708@opencloud.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Bar: - X-Spam-Score-Int: -16 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/201 X-Sequence-Number: 18408 Hello Oliver, Oliver Jowett schrieb: > Running an empty query ("") is probably the simplest way. > > In theory you could do something slightly faster at the protocol level > (just send Sync and wait for ReadyForQuery) but there's no interface > currently exposed to do that and I doubt that it will be much faster > than an empty query anyway. Yes, I investigated that, but since the normal query procedure also just sends one package, the gain for just sending the sync does not really matter. Of course, your idea with the empty query is great. Thanks alot. With best regards, Daniel Migowski