Skip site navigation (1) Skip section navigation (2)

Re: libpq connectoin redirect

From: feng tian <ft_uw(at)hotmail(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq connectoin redirect
Date: 2010-04-22 16:51:12
Message-ID: BAY144-W6A8957F6B5422B3D522A980080@phx.gbl (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hi, John,

The change will be on the libpq client side.  I am not saying this is a general
solution for the distributed transaction/scale out.  However, in many cases, it
is very useful.  For example, in my case, I have about 100 departments each has 
it own database.  The balance machine can just redirect to the right box according
to database/user.  The 4 boxes I have may not even get domain name or static IP.
Another scenario, if I have some kind of replication set up, I can send transaction
processing to master and analytic reporting query to slaves. 


feng tian wrote:

I want to load balance a postgres server on 4 physical 
machines, say  I can set up a pgbouncer on and 
pooling to my four boxes.  However, the traffic from/to clients
go through an extra hop.  Another way to do this, is to send 
client an "redirect" message.  When client connect to, 
instead of accepting the connection, it can reply to client 
telling it 
to reconnect to one of the server on 

I am planning to write/submit a patch to do that.  I wonder if 
is similar effort in extending libpq protocol, or, if you have 
ideas on how to achieve this.

how do you plan on maintaining consistency, transactional 
integrity and 
atomicity of updates across these 4 machines?
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.

In response to

pgsql-hackers by date

Next:From: Erik RijkersDate: 2010-04-22 18:39:14
Subject: Re: testing HS/SR - 1 vs 2 performance
Previous:From: feng tianDate: 2010-04-22 16:42:06
Subject: Re: libpq connectoin redirect

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group