Re: Doubt on pgbouncer

From: Ben Chobot <bench(at)silentmedia(dot)com>
To: Rama Krishnan <raghuldrag(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Doubt on pgbouncer
Date: 2021-07-03 17:49:57
Message-ID: a869189f-37bd-d12e-f3b6-de988a88719e@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rama Krishnan wrote on 7/3/21 8:35 AM:
>
> Hi Team,
>
> How can I split read and write queries using pgbouncer

You do it with your application. Make a pgbouncer database for
read/write queries and point it at your postgresql primary, and then
make a second pgbouncer database for read-only queries and point it at a
replica. Have your application connect to the proper database, depending
upon its needs.

It's not transparent, but it is effective.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2021-07-03 17:59:02 Re: Overlapping timestamptz ranges with priority
Previous Message Rama Krishnan 2021-07-03 17:21:19 Re: Doubt on pgbouncer