Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TOp3x-00044L-Is for pgsql-jdbc@postgresql.org; Thu, 18 Oct 2012 12:18:57 +0000 Received: from mail-da0-f46.google.com ([209.85.210.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TOp3r-0001tj-1k for pgsql-jdbc@postgresql.org; Thu, 18 Oct 2012 12:18:56 +0000 Received: by mail-da0-f46.google.com with SMTP id n41so3452819dak.19 for ; Thu, 18 Oct 2012 05:18:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=CE3da3vgst81RQclVnelovDCou7CS0j0HOdTo9qQQAE=; b=GkWl3gfxk8/uDOddTI+gP5n2LYM0umWetdbQG1oKy+XQguNLuIS05CyIywEnwUNuat NKFlEkkDTyVxaxKi/QwpxYy0j7TRxc49mRckN2YqGbqJ4A+Dg8PbPkZysjK8WQ8TjHK3 YTCKbwaHCKoBhnLSmcKyLRGHbFlTp/4pmvkGUA5kdfEEiFXdyleWX5EJ/p9fvDp+3/GF Z/K4J6xY3rhBbS1++BBzI/4B8uLLmfbrgX4saH3Xy3nlMeFDV7WHlenOv3nP5viXPxT8 ZCsGneg5v+l7+uZRfUQtEWJNksgLJitZgVOaLgV4yO+L1aXGe6AfYhXVT12073vIOr5W lBSA== Received: by 10.68.203.164 with SMTP id kr4mr65478658pbc.46.1350562728908; Thu, 18 Oct 2012 05:18:48 -0700 (PDT) Received: from ayaki.localdomain (124-148-78-49.dyn.iinet.net.au. [124.148.78.49]) by mx.google.com with ESMTPS id qv4sm12814067pbc.38.2012.10.18.05.18.45 (version=SSLv3 cipher=OTHER); Thu, 18 Oct 2012 05:18:47 -0700 (PDT) Message-ID: <507FF3A2.4040306@ringerc.id.au> Date: Thu, 18 Oct 2012 20:18:42 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0 MIME-Version: 1.0 To: Mikko Tiihonen CC: =?ISO-8859-1?Q?S=E9rgio_Saquetim?= , "pgsql-jdbc@postgresql.org" , Rafael dos Santos Silva Subject: Re: Severe performance degradation when using the 9.2-1000 JDBC 4 driver References: , <507FC5EA.6070905@ringerc.id.au> <51061EFB789B4A45AC6598C83649B7BE8DB56604@NBL-EXCD1-01.nebula.local> In-Reply-To: <51061EFB789B4A45AC6598C83649B7BE8DB56604@NBL-EXCD1-01.nebula.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmgjiLMZGvHKAOlecBKQJGlqVI9cbNGw49lDhT6sIM6sFupcXSGr1VsYeC2cArKLZ81x5hZ X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/79 X-Sequence-Number: 23403 On 10/18/2012 05:17 PM, Mikko Tiihonen wrote: > I think the DNS lookup is part of the JDBC failover connection patch that I created. > I initially used a InetSocketAddress.getHostString() that does not do any DNS lookups, but since that method was added in Java7 I had to revert to getHostName() method which does. > > I see following options: 0) Revert the JDBC failover patch or require a connection parameter to enable it > 1) modify the code so that is uses reflection and if Java7 is detected it will use the no-lookup method Gah! no! Not only will this not work in most SecurityManager contexts, but it's slow and horrid. > 2) wait 4 months until Oracle drops Java6 support (Java6 was supposed to be EOL already few months back) and use the no-lookup variant ... then another two years or so until it's actually adopted. People still use Java 1.4, and 1.5 remains very wide-spread. Sadly. > 3) let the code stay as is and let users fix their dns servers While sometimes reasonable, in this case it's also a performance regression for functionality most will never need, so -1 to that. -- Craig Ringer