Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1em399-0006a9-Pq for pgsql-general@arkaria.postgresql.org; Wed, 14 Feb 2018 19:55:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1em398-0002lc-HA for pgsql-general@arkaria.postgresql.org; Wed, 14 Feb 2018 19:55:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1em398-0002lL-94 for pgsql-general@lists.postgresql.org; Wed, 14 Feb 2018 19:55:14 +0000 Received: from sonic313-20.consmr.mail.gq1.yahoo.com ([98.137.65.83]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1em390-0007Sj-Ox for pgsql-general@postgresql.org; Wed, 14 Feb 2018 19:55:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1518638103; bh=Takh6Zmsv8L88vesE/8O1TK8m86K0Sw3fwT9yQeYCgk=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=CwN+VvZghhRqdtLpRLZy+kjkHuTnDeNtliYK5aXrNPym6sfIDnKU8oGy6h3q2jYeXAMKEdJ+3mSMrwujKGd+/T98xJxAjYFHZ12yyWm6xJzNcTtUpmodW3++O4hshT05C43622jSaHjU2DwpCcFNdOSI7iZgUBnDjY95OuQWttwTHEZO9DPyy76v/bB3OTnVYKImm7sMzwVhsImf7UBgRKxnD89F8xrVPveV3lW0+SMLFdI9j+m19lOMa4UcsT+UAC9owe2/r/vkwPsrP4pyJULAJjQvgEDHSAXuAoTxLI/1xY59jXgLBag/Lvd3S8BdqplLe/qi6fpHcCAHbRzeOQ== X-YMail-OSG: VgQpddYVM1lUN67LY_mPoe2Ay9ENVsPqRGn10X4_3ys2flz3Yy49Ys7WzPyR4VH N6mWQ5BC2e_fSKrO9SBb3nNKGMFaqaV1m2ZFCOWy.vJcV4fjPFzS29L8P51mNT2SmSHRKxbX71Tx XlJtNckB6SAdkOZdxPaoRWM3R9XzXYTo.G0oXvS_lvdUTUgiGcYXRmXyepDXO9ZWXWHIm_Sy5dcp 5JGXlp6vykcV9r3lGeRZLgqg.ZQumewcUyPvLlxZqnWPDa4reVviQ71zvrWumwPDzme0xMs__i2C sKhgjXJYJZV6WU2c4GrbuuLwUcSilIoA2kRNgVd68FY6yWOu0o.xq1ultZmAtwUV5bHyCalS2c91 w4jeWPOXlQq8WsBrwqBejchP1nECWQbOIuJKzhJhTPaz.wnrwCPQaYN_DZqwRK2IsbZiN1UPl7K7 qEy6mAp65h.U62Jlti_0TzlYLgGp260LVvZ84mR.KMeIqGaFVW9pGSJClP1jofZzVWww2OmDFaxa az1sVmCo_vQ9lVxKz Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Wed, 14 Feb 2018 19:55:03 +0000 Date: Wed, 14 Feb 2018 19:55:00 +0000 (UTC) From: Pierre Timmermans To: Melvin Davidson Cc: "pgsql-general@postgresql.org >> PG-General Mailing List" , Venkateswaran Message-ID: <1852095905.899017.1518638100059@mail.yahoo.com> In-Reply-To: References: <1518616787774-0.post@n3.nabble.com> <1967814526.885559.1518636446225@mail.yahoo.com> Subject: Re: Split read/write queries between 2 servers (one master and one slave with streaming replication)? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_899016_1000600688.1518638100054" X-Mailer: WebService/1.1.11419 YMailNorrin Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Content-Length: 8883 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_899016_1000600688.1518638100054 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks. Indeed pgBouncer is the usual candidate in front of postgres stream= ing replication, together with pgpool. Take care that your link on pgBounce= r dates back from 2008 !.=C2=A0 I had a look at pgBouncer in the past, but it was not actively maintained a= t that time.=C2=A0So I settled on a combination of pgpool and repmgr. Peopl= e on pgpool mailing list are very reactive and helpful and the doc on the p= roject is continuously improving. Pierre=20 On Wednesday, February 14, 2018, 8:44:47 PM GMT+1, Melvin Davidson wrote: =20 =20 =20 On Wed, Feb 14, 2018 at 2:27 PM, Pierre Timmermans wrot= e: 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=C2=B0 This looks a very interesting possibility, although it is more related to a= utomated failover than to load balancing of read only queries :=C2=A0http:/= /paquier.xyz/ postgresql-2/postgres-10- libpq-read-write/, depending on you= r client it might be supported. It is not supported - yet ? - by the node-p= ostgres driver. Regards,=C2=A0 Pierre=20 On Wednesday, February 14, 2018, 3:29:03 PM GMT+1, Venkateswaran wrote: =20 =20 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 =20 Actually, if you are looking for load balancing PgBouncer is better than Pg= Pool. There is a nice article about that. https://www.last.fm/user/Russ/journal/2008/02/21/zd_postgres_connection_poo= ls:_pgpool_vs._pgbouncer I used PgBouncer in a few of ny previous positions and found it to be very = fast and efficient. --=20 Melvin Davidson I reserve the right to fantasize.=C2=A0 Whether or not you=20 wish to share my fantasy is entirely up to you.=20 =20 ------=_Part_899016_1000600688.1518638100054 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks. Indeed pgBouncer is= the usual candidate in front of postgres streaming replication, together w= ith pgpool. Take care that your link on pgBouncer dates back from 2008 !.&n= bsp;

I had a look at pgBouncer in the past, but it= was not actively maintained at that time. So I settled on a combinati= on of pgpool and repmgr. People on pgpool mailing list are very reactive an= d helpful and the doc on the project is continuously improving.
<= br>
Pierre


=20
=20
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 stand= by database as a read only while other queries are sent to the primary data= base only (http://www.pgpool.net/). Good product and good sup= port (on the list=C2=B0

This looks = a very interesting possibility, although it is more related to automated fa= ilover than to load balancing of read only queries : http://paquier.xyz/ postgresql-2/postgres-1= 0- libpq-read-write/, depending on your client it might be supported. I= t is not supported - yet ? - by the node-postgres driver.

Regards, 

Pierre


=20
=20
On Wednesday, February 14, 2018, 3:29:03 PM GMT+1, = Venkateswaran <venkateswaran.srec@gmail.com&g= t; wrote:


Hi,

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



--


=
Actually,= if you are looking for load balancing PgBouncer is better than PgPool. The= re is a nice article about that.
https://ww= w.last.fm/user/Russ/journal/2008/02/21/zd_postgres_connection_pools:_pgpool= _vs._pgbouncer

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

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

------=_Part_899016_1000600688.1518638100054--