Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 6DA681337BE3 for ; Sun, 20 Mar 2011 18:09:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 84689-01-4 for ; Sun, 20 Mar 2011 21:09:17 +0000 (UTC) X-Greylist: delayed 00:05:00.151299 by SQLgrey-1.7.6 Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com [209.85.216.46]) by mail.postgresql.org (Postfix) with ESMTP id 84E8B13387C8 for ; Sun, 20 Mar 2011 17:59:42 -0300 (ADT) Received: by qwk3 with SMTP id 3so3788640qwk.19 for ; Sun, 20 Mar 2011 13:59:42 -0700 (PDT) Received: by 10.229.78.164 with SMTP id l36mr2579417qck.218.1300654481888; Sun, 20 Mar 2011 13:54:41 -0700 (PDT) Received: from [10.0.1.200] (krb.hoozinga.com [173.162.180.129]) by mx.google.com with ESMTPS id s9sm3797233qco.0.2011.03.20.13.54.40 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Mar 2011 13:54:41 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1082) Subject: Re: Hot-standby/Reporting database. From: jonathan ferguson In-Reply-To: <1300483544.6860.48.camel@darkflame.weatherman.net> Date: Sun, 20 Mar 2011 16:54:39 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <296E40A1-FA4E-4FDE-9A40-EB9315916CAC@hoozinga.com> References: <0515F2BB-0522-449C-848B-4E750F4D91BB@pandora.com> <1300483544.6860.48.camel@darkflame.weatherman.net> To: pgsql-admin@postgresql.org X-Mailer: Apple Mail (2.1082) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.4 tagged_above=-10 required=5 tests=BAYES_00=-1.9, URI_NOVOWEL=0.5 X-Spam-Level: X-Archive-Number: 201103/204 X-Sequence-Number: 37076 hi. On Mar 18, 2011, at 5:25 PM, John P Weatherman wrote: > All, >=20 > I have recently upgraded to Postgres9 and am building a hot standby = for > reporting. Unfortunately, my end users are providing requirements for > 1) real time data replication (which the hot standby does) and 2) the > ability to create temporary tables as part of their reporting jobs > (which is expressly prohibited in a hot standby. As you rightly note, if you are seeking replication for reporting and = need to change the reporting database, then you do *not* want to use = PostgreSQL 9's replication/hot-standby features, as WAL shipping = disallows any writes to the database, or differences.=20 Instead, you will want to look at the following for realtime = replication/failover, if you have not already: = http://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Po= oling Pay particular attention to the references, particularly from the = Mailing List, and links.=20 You might find Slony-I or Londiste or Bucardo to be the right answer for = your needs. Here's more on Replication with pgpool-II and slony-I: http://pgsqlpgpool.blogspot.com/2010/06/pgpool-ii-and-hot-standby.html = http://pgsqlpgpool.blogspot.com/2010/06/talk-with-author-of-streaming.html= = http://scanningpages.wordpress.com/2010/10/09/9-0-streaming-replication-vs= -slony/ = http://stackoverflow.com/questions/3692493/pgpool-ii-for-postgres-is-it-wh= at-i-need > Has anyone run into this already and have an idea for a work around? = I > am primarily an Oracle guy and in that environment I would set up a > second DB with database links to the hot standby, then they could > connect somewhere they could create tables and use the links to pull = the > real time data...keeping them away from production with ad hoc code. > I'm not sure if there is any way to do that with postgres. I too am creating a similar set-up. I too would value the wisdom of the = ML. According to the Slony-I page, it appears that slaves might be able = to be writable reporting databases. Is this true? I second the what $REP_TECH be used to replicate to a reporting = database, where reporters want to write to the reporting database? +1 on = "how have people done this?"=20 In my researches so far, I've found the following informative: http://archives.postgresql.org/pgsql-admin/2010-08/msg00173.php http://www.sraoss.co.jp/event_seminar/2010/20100702-03char10.pdf http://momjian.us/main/writings/pgsql/replication.pdf http://www.fastware.com.au/docs/PostgreSQL_HighAvailability.pdf Thanks. have a day.yad jdpf