Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOFYW-0002p6-Ul for pgsql-general@arkaria.postgresql.org; Fri, 02 Oct 2020 07:32:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kOFYV-0008RI-RU for pgsql-general@arkaria.postgresql.org; Fri, 02 Oct 2020 07:32:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOFYV-0008R2-JM for pgsql-general@lists.postgresql.org; Fri, 02 Oct 2020 07:32:39 +0000 Received: from hermes.gatewaynet.com ([193.92.121.98]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOFYS-000615-Oe for pgsql-general@lists.postgresql.org; Fri, 02 Oct 2020 07:32:38 +0000 Received: from smadev.internal.net (pc131.internal.net [10.9.200.131]) by hermes.gatewaynet.com (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 0927WRpv016404 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 2 Oct 2020 10:32:32 +0300 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id 0927WQKU070063 for ; Fri, 2 Oct 2020 10:32:27 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: Doubt in pgbouncer To: pgsql-general@lists.postgresql.org References: From: Achilleas Mantzios Message-ID: Date: Fri, 2 Oct 2020 10:32:26 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------0B76998B7078A437740630AB" Content-Language: en-US X-Virus-Scanned: clamav-milter 0.102.4 at hermes X-Virus-Status: Clean X-Spam-Status: No, score=-26.6 required=5.0 tests=ALL_TRUSTED,DYN_HAM_COORD, DYN_HAM_IT,DYN_HAM_NAUTICAL,DYN_HAM_SIGNAT1,HTML_FONT_FACE_BAD, HTML_MESSAGE,TW_PG autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hermes.gatewaynet.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------0B76998B7078A437740630AB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 2/10/20 9:50 π.μ., Fabio Pardi wrote: > Hi Rama, > > On 02/10/2020 01:42, Rama Krishnan wrote: >> Hi Friends, >> >> By using pg bouncer can we split read and queries >> > > pgbouncer is just a connection pooler. > > The logic where to send the reads and where the writes, should be in our application. yeah reading back some comments over the github on various issues, the pgbouncer hackers were of the philosophy that pgbouncer should remain as query agnostic as possible, in the sense that it should not investigate the content of the queries. Those had to do with classic problems like search_path in transaction mode (some PR's were rejected because of that). You might find this interesting : https://github.com/awslabs/pgbouncer-rr-patch > > regards, > > fabio pardi -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt --------------0B76998B7078A437740630AB Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 2/10/20 9:50 π.μ., Fabio Pardi wrote:
Hi Rama,

On 02/10/2020 01:42, Rama Krishnan wrote:
Hi Friends, 

By using pg bouncer can we split read and queries


pgbouncer is just a connection pooler.

The logic where to send the reads and where the writes, should be in our application.

yeah reading back some comments over the github on various issues, the pgbouncer hackers were of the philosophy that pgbouncer should remain as query agnostic as possible, in the sense that it should not investigate the content of the queries. Those had to do with classic problems like search_path in transaction mode (some PR's were rejected because of that).
You might find this interesting : https://github.com/awslabs/pgbouncer-rr-patch

regards,

fabio pardi


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
--------------0B76998B7078A437740630AB--