pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre Timmermans <ptim007@yahoo.com>
To: Melvin Davidson <melvin6925@gmail.com>
Cc: pgsql-general@postgresql.org >> PG-General Mailing List <pgsql-general@postgresql.org>
Cc: Venkateswaran <venkateswaran.srec@gmail.com>
Subject: Re: Split read/write queries between 2 servers (one master and one slave with streaming replication)?
Date: Wed, 14 Feb 2018 19:55:00 +0000 (UTC)
Message-ID: <1852095905.899017.1518638100059@mail.yahoo.com> (raw)
In-Reply-To: <CANu8Fiy_TFdFAbCt-snjwFP+JJs++08r1X5Aincf-rb1ikDW+g@mail.gmail.com>
References: <CANjd3nfW0_Px0uAPMEXkths3jaD+YuBwbw843mzkdQY-__4obQ@mail.gmail.com>
	<CAB5sPxZcUWnE6w+U_+3S1Ui5Tv__Xn26d3vqdJ-LtX+7=f2_VA@mail.gmail.com>
	<1518616787774-0.post@n3.nabble.com>
	<1967814526.885559.1518636446225@mail.yahoo.com>
	<CANu8Fiy_TFdFAbCt-snjwFP+JJs++08r1X5Aincf-rb1ikDW+g@mail.gmail.com>

Thanks. Indeed pgBouncer is the usual candidate in front of postgres streaming replication, together with pgpool. Take care that your link on pgBouncer dates back from 2008 !. 
I had a look at pgBouncer in the past, but it was not actively maintained at that time. So I settled on a combination of pgpool and repmgr. People on pgpool mailing list are very reactive and helpful and the doc on the project is continuously improving.
Pierre 

    On Wednesday, February 14, 2018, 8:44:47 PM GMT+1, Melvin Davidson <melvin6925@gmail.com> wrote:  
 
 

On Wed, Feb 14, 2018 at 2:27 PM, Pierre Timmermans <ptim007@yahoo.com> wrote:

pgpool does just that: it enables you to use the standby database as a read only while other queries are sent to the primary database only (http://www.pgpool.net/). Good product and good support (on the list°
This looks a very interesting possibility, although it is more related to automated failover than to load balancing of read only queries : http://paquier.xyz/ postgresql-2/postgres-10- libpq-read-write/, depending on your client it might be supported. It is not supported - yet ? - by the node-postgres driver.
Regards, 
Pierre 

    On Wednesday, February 14, 2018, 3:29:03 PM GMT+1, Venkateswaran <venkateswaran.srec@gmail.com> wrote:  
 
 Hi,

I am also trying to split read and write queries, where reads should go to
the slave server (streaming replication) and writes to the master server.
Any tool available to perform this activity instead of two connection pool?



--
Sent from: http://www.postgresql-archive. org/PostgreSQL-general- f1843780.html

  

Actually, if you are looking for load balancing PgBouncer is better than PgPool. There is a nice article about that.
https://www.last.fm/user/Russ/journal/2008/02/21/zd_postgres_connection_pools:_pgpool_vs._pgbouncer

I used PgBouncer in a few of ny previous positions and found it to be very fast and efficient.

-- 
Melvin Davidson
I reserve the right to fantasize.  Whether or not you 
 wish to share my fantasy is entirely up to you. 
  

view thread (6+ messages)

Message-ID: <1852095905.899017.1518638100059@mail.yahoo.com>
Permalink:  ../1852095905.899017.1518638100059@mail.yahoo.com/
Also on:    postgresql.org/message-id/1852095905.899017.1518638100059@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ptim007@yahoo.com, melvin6925@gmail.com, venkateswaran.srec@gmail.com
  Subject: Re: Split read/write queries between 2 servers (one master and one slave with streaming replication)?
  In-Reply-To: <1852095905.899017.1518638100059@mail.yahoo.com>
  References: <CANjd3nfW0_Px0uAPMEXkths3jaD+YuBwbw843mzkdQY-__4obQ@mail.gmail.com> <CAB5sPxZcUWnE6w+U_+3S1Ui5Tv__Xn26d3vqdJ-LtX+7=f2_VA@mail.gmail.com> <1518616787774-0.post@n3.nabble.com> <1967814526.885559.1518636446225@mail.yahoo.com> <CANu8Fiy_TFdFAbCt-snjwFP+JJs++08r1X5Aincf-rb1ikDW+g@mail.gmail.com> <1852095905.899017.1518638100059@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox