Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZS3dp-00060b-U0 for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Aug 2015 13:42:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZS3dp-0001BY-G3 for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Aug 2015 13:42:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZS3cW-0007Ic-Fu for pgsql-hackers@postgresql.org; Wed, 19 Aug 2015 13:41:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZS3cT-0000Ez-VX for pgsql-hackers@postgresql.org; Wed, 19 Aug 2015 13:41:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t7JDfWsp030616; Wed, 19 Aug 2015 09:41:32 -0400 From: Tom Lane To: Albe Laurenz cc: "'''Victor Wagner *EXTERN*' *EXTERN*' *EXTERN*'" , "pgsql-hackers@postgresql.org" Subject: Re: Proposal: Implement failover on libpq connect level. In-reply-to: References: <20150818041850.GA5092@wagner.pp.ru> <20150819065146.GA31302@wagner.pp.ru> <20150819074417.GE31302@wagner.pp.ru> Comments: In-reply-to Albe Laurenz message dated "Wed, 19 Aug 2015 09:21:50 -0000" Date: Wed, 19 Aug 2015 09:41:32 -0400 Message-ID: <30615.1439991692@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Albe Laurenz writes: > Victor Wagner wrote: >> It would just take a bit more time for client and a bit more load for >> server - to make sure that this connection is read-write by >> issuing >> show transaction_read_only >> statement before considering connection useful. > That's not very comfortable, and a lot of middleware software won't easily > learn the trick. That sort-of ties into what seems to me the main objection to this proposal, namely that there is already a way to do this sort of thing: DNS-based load balancing. All the clients think they connect to db.mycompany.com, but which server they actually get is determined by what IP address the DNS server tells them to use. This is a technology that is very well established, known to every large-site admin, and usable for every Internet-based service. Even if libpq had its own nonstandard way of doing something similar, the site admins would probably still need to use DNS load balancing for other services. In fact, they'd still need to use DNS balancing for Postgres, because not everything connects with libpq (think JDBC for instance). So I think we ought to reject this proposal, full stop. I see no reason to re-invent this wheel, and there are good reasons not to. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers