Re: Split read/write queries between 2 servers (one master and one slave with streaming replication)?

From: Adam Cornett <adam(dot)cornett(at)gmail(dot)com>
To: Benjamin Henrion <bh(at)udev(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Split read/write queries between 2 servers (one master and one slave with streaming replication)?
Date: 2012-03-01 22:30:14
Message-ID: CAB5sPxZcUWnE6w+U_+3S1Ui5Tv__Xn26d3vqdJ-LtX+7=f2_VA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 1, 2012 at 5:06 PM, Benjamin Henrion <bh(at)udev(dot)org> wrote:

> Hi,
>
> I am trying pgpool2 to split read and write queries, where reads
> should go to the slave server (streaming replication) and writes to
> the master server.
>
> Anybody has a config file that works for pgpool2?
>
> Best,
>
> --
> Benjamin Henrion <bhenrion at ffii.org>
> FFII Brussels - +32-484-566109 - +32-2-3500762
> "In July 2005, after several failed attempts to legalise software
> patents in Europe, the patent establishment changed its strategy.
> Instead of explicitly seeking to sanction the patentability of
> software, they are now seeking to create a central European patent
> court, which would establish and enforce patentability rules in their
> favor, without any possibility of correction by competing courts or
> democratically elected legislators."
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

I've attached my pgpool conf.
All pgpool is doing here is the load balancing, replication is handled by
streaming replication (9.0+)
PGPool can be setup to do auto failover as well, although that isn't shown
in the attached config.

I'm sure some pgpool people will jump on and let me know how I'm doing it
wrong, but this is working quite well in production for us.
-Adam

Attachment Content-Type Size
pgpool.conf application/octet-stream 18.6 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message chinnaobi 2012-03-02 08:28:48 Re: archive_cleanup_command recovery.conf Standby server error
Previous Message Benjamin Henrion 2012-03-01 22:06:29 Split read/write queries between 2 servers (one master and one slave with streaming replication)?