Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id C676C19B0DDD for ; Thu, 17 May 2012 14:24:03 -0300 (ADT) Received: from exprod7og105.obsmtp.com ([64.18.2.163]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SV4Qj-0006sk-UU for pgsql-jdbc@postgresql.org; Thu, 17 May 2012 17:24:03 +0000 Received: from mail-lb0-f176.google.com ([209.85.217.176]) (using TLSv1) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKT7U0JDKnnQDBiEk/UflSOylKYxcFyLT1@postini.com; Thu, 17 May 2012 10:24:01 PDT Received: by lboj14 with SMTP id j14so1424869lbo.7 for ; Thu, 17 May 2012 10:23:46 -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=nJrWI52Wem1X+wSCWuiafbcfiliMqR43RsseO6Sbh4A=; b=aHpb1N1CdTpUec7R7oGfYG9eFfdb4xtyB+0v9YTyK6/bTOZZkGpg7ugLvHQE6dalQE bnAizv2ofE0N05285OPgHhulFzjhxK/wyup/vxmJYa3JxDj3cXNk7VexKmiMwzfIc1CY 8CYiyGvbZfhbzJWi0edzF5XPR2MGKl9nm3AuaO1evsiKE72/kmCEzcrNe2AXzHbKkTVX CrX6uYGqym83aIdSZH8ZDLKkgzhdK//vAyq3MZxJ3omnZYzyQtfSVr29cWoccp2gEn+k ViHo7iRqIHtDOck2whCofD7L2N55+NCx5y0lSBs9SCyqjebZQxF0ZXFaYNVCbLbHzQxa Lndg== Received: by 10.152.109.166 with SMTP id ht6mr7867586lab.46.1337275426591; Thu, 17 May 2012 10:23:46 -0700 (PDT) Received: from [192.168.1.102] (dsl-hkibrasgw2-ff6cc300-200.dhcp.inet.fi. [88.195.108.200]) by mx.google.com with ESMTPS id s3sm5652256lbk.11.2012.05.17.10.23.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 May 2012 10:23:45 -0700 (PDT) Message-ID: <4FB5341B.8080206@enterprisedb.com> Date: Thu, 17 May 2012 20:23:39 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120510 Icedove/10.0.4 MIME-Version: 1.0 To: Mikko Tiihonen CC: pgsql-jdbc@postgresql.org Subject: Re: Connection-fail-over References: <4FB52EBB.4060309@nitorcreations.com> In-Reply-To: <4FB52EBB.4060309@nitorcreations.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlNegSh9m0TL9HQSUoob043RGlAAVEtAFtYl0VKfCdWFuUtnpYZoPgE/ToznVyyCeP4kp6w X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201205/53 X-Sequence-Number: 22953 On 17.05.2012 20:00, Mikko Tiihonen wrote: > Hi, > > I have been thinking of adding connection fail-over support to the jdbc > driver. What this means is that there would be a way to specify more > than host:port pair to connect to. This will become handy with > high-availability installations. > > Currently the limitation of hostname means that there has to be a > virtual ip address that is moved with the active backend, which is a > complex solution that can break. > > If we have list of hostname:port pairs we just have to make sure that > only the master database allows connections from the jdbc clients. I'd suggest doing this as a generic wrapper or proxy that would work with any JDBC driver, not just PostgreSQL's. Maybe there is such a thing out there already? I believe many application servers at least can do that, and then there's http://ha-jdbc.sourceforge.net/, which I think can do that too. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com