Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EB48E1337BB7 for ; Wed, 20 Apr 2011 09:49:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 02815-09 for ; Wed, 20 Apr 2011 12:49:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from qmta10.westchester.pa.mail.comcast.net (qmta10.westchester.pa.mail.comcast.net [76.96.62.17]) by mail.postgresql.org (Postfix) with ESMTP id AEE6D1337B54 for ; Wed, 20 Apr 2011 09:49:14 -0300 (ADT) Received: from omta05.westchester.pa.mail.comcast.net ([76.96.62.43]) by qmta10.westchester.pa.mail.comcast.net with comcast id Zolf1g0050vyq2s5AopF7w; Wed, 20 Apr 2011 12:49:15 +0000 Received: from homie ([68.36.64.241]) by omta05.westchester.pa.mail.comcast.net with comcast id ZopC1g01N5CJV443RopD9h; Wed, 20 Apr 2011 12:49:14 +0000 Received: by homie (Postfix, from userid 1000) id E7DB020C71; Wed, 20 Apr 2011 08:49:10 -0400 (EDT) From: Jerry Sievers To: Greg Stark Cc: Robert Haas , pgsql-hackers@postgresql.org Subject: Re: time-delayed standbys References: Date: Wed, 20 Apr 2011 08:49:10 -0400 In-Reply-To: (Greg Stark's message of "Wed, 20 Apr 2011 12:24:25 +0100") Message-ID: <87wriphyux.fsf@comcast.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (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.355 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/1008 X-Sequence-Number: 186210 Greg Stark writes: > On Wed, Apr 20, 2011 at 3:47 AM, Robert Haas wrote: > >> While I was out at the MySQL conference last week, I heard that one of >> the forthcoming MySQL features is "time-delayed replication": > > Incidentally, this is a popular Oracle feature. It's a poor man's > "flashback" and similar to how some filesystems automatically create > regular snapshots of every home directory so you can get back stuff at > some arbitrary point in the past. Yup. One of the big bosses where I work went asking for this a couple years ago. We're multi-platform; Oracle, MySQL, EnterpriseDB, Vertica. They put a 6 hour delay on the critical Oracle boxes. NOthing was done for MySQL or Vertica since no feature support. My C-foo being rusty, I elected to add more hacks to our home-spun PYthon version of pg_standby rather than adding the feature to pg_standby itself. Been running with delayed WAL apply ever since.. Shipping happens immediatly on log creation at master and we simply wait for the files to age the configured time before application. In a few cases, we have 2 or more standbys off the same prod master. One in real-time mode and the others lagged. Thanks all! -- Jerry Sievers Postgres DBA/Development Consulting e: gsievers19@comcast.net p: 305.321.1144