Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TP6ue-00071b-Sl for pgsql-jdbc@postgresql.org; Fri, 19 Oct 2012 07:22:32 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TP6uY-0000IG-96 for pgsql-jdbc@postgresql.org; Fri, 19 Oct 2012 07:22:32 +0000 Received: by mail-pb0-f46.google.com with SMTP id rr4so231304pbb.19 for ; Fri, 19 Oct 2012 00:22:23 -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=S482qsStw0Y/SMO27dBxVEuytQ6Uaiu4m05jIKJnThU=; b=ezHCgL4oyxHcoqGfEmBZVI8v4Lsd4mXLNOeAUiUKtYReYl+DYwJeTuHbhSnSz1RifK MD9TIDUXTZfkMqFdaOh1/uZR9hWkEp3OKXnL+6HtHnI972f7EIickO7jVcYq7a5D7HHz mRWHVROBKYssmMY9KWAxZru8u11YcxucNXJLgswcfyi8rxGuDF5xY/QoVO+UA8bIOkXz CsLrIwew4lT3y0MFOJ8QUa1D7S5Mfrk8phhSVk+I1Cu5nBDFcvo/Fl3WIpAXreA2fdhR eYC6Ygl/THDI/7xyLZrYFn3FE99YnmkdnadqMpDYikuWdTmo6190th20ExkSmr5Ud/9k HrUg== Received: by 10.66.78.6 with SMTP id x6mr1252040paw.41.1350631343024; Fri, 19 Oct 2012 00:22:23 -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 sa2sm822236pbc.4.2012.10.19.00.22.19 (version=SSLv3 cipher=OTHER); Fri, 19 Oct 2012 00:22:22 -0700 (PDT) Message-ID: <5080FFA9.70402@ringerc.id.au> Date: Fri, 19 Oct 2012 15:22:17 +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: Kris Jurka , =?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>, <51061EFB789B4A45AC6598C83649B7BE8DB56894@NBL-EXCD1-01.nebula.local> In-Reply-To: <51061EFB789B4A45AC6598C83649B7BE8DB56894@NBL-EXCD1-01.nebula.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmmAq9JuCgegtMmAFz7I40tGIKXtR07Utbr2YrOuMh+V7tmtm6M5WnG7bnxQui1na5jcL4F X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/88 X-Sequence-Number: 23412 On 10/19/2012 02:36 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. >>> >> >> Is there any functionality that we need that is provided by using >> InetSocketAddress or is it just a convenient object to pass around host >> and port together? The simplest option to me seems to be reverting to >> passing simple strings/ints around (possibly in some kind of our own >> container). > > It is just a convenient container. And it seems on older JVMs it cannot be used for such purposes. > I agree that we should just replace it with our own container that contains the host/port pair. If that's all you're using it for, then that's the simplest and best choice. +1 from me on that. -- Craig Ringer