Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6348563362F for ; Mon, 31 May 2010 10:42:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 08674-02 for ; Mon, 31 May 2010 13:42:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp1.hi-media-techno.com (smtp1.hi-media-techno.com [195.158.241.85]) by mail.postgresql.org (Postfix) with ESMTP id 74A3F632A60 for ; Mon, 31 May 2010 10:42:02 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by smtp1.hi-media-techno.com (Postfix) with ESMTP id C84A693B89; Mon, 31 May 2010 15:41:59 +0200 (CEST) Received: from smtp1.hi-media-techno.com ([127.0.0.1]) by localhost (smtp1.backbone.hi-media-techno.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mz9s+YHxpZy5; Mon, 31 May 2010 15:41:59 +0200 (CEST) Received: from mail1.hi-media-techno.com (unknown [192.168.27.17]) by smtp1.hi-media-techno.com (Postfix) with ESMTP id 8501C93B6C; Mon, 31 May 2010 15:41:59 +0200 (CEST) Received: from dim (unknown [83.167.62.196]) by mail1.hi-media-techno.com (Postfix) with ESMTPSA id 24CB427E134; Mon, 31 May 2010 15:41:59 +0200 (CEST) Received: by dim (Postfix, from userid 1000) id DD0EF3FC1; Mon, 31 May 2010 15:43:45 +0200 (CEST) From: Dimitri Fontaine To: Jamie Tufnell Cc: pgsql-admin@postgresql.org Subject: Re: Advice on HA/LB setup for small installation Organization: Hi-Media References: User-Mail-Address: dfontaine@hi-media.com Date: Mon, 31 May 2010 15:43:45 +0200 In-Reply-To: (Jamie Tufnell's message of "Fri, 14 May 2010 12:15:49 +1000") Message-ID: <87bpbwtcdq.fsf@hi-media-techno.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-10 required=5 tests=BAYES_20=-0.001 X-Spam-Level: X-Archive-Number: 201005/301 X-Sequence-Number: 34774 Jamie Tufnell writes: > Secondly, is there a companion tool to achieve this with pgbouncer? > Note I have nothing against pgpool, just curious as we're already > using pgbouncer in production. If you mean distributing the read-only queries to more than one server backend, you can use haproxy in TCP mode for that. Application talks to pgbouncer, which talks to haproxy, which connects to PostgreSQL. Please note that nothing there will triage the read-only queries apart from your application, and the hot-standby PostgreSQL (which will error out). Regards, -- dim