Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XJ6Um-0000g8-No for pgsql-docs@arkaria.postgresql.org; Sun, 17 Aug 2014 19:52:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XJ6Um-000359-8G for pgsql-docs@arkaria.postgresql.org; Sun, 17 Aug 2014 19:52:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XJ6Ul-000350-NS for pgsql-docs@postgresql.org; Sun, 17 Aug 2014 19:52:03 +0000 Received: from mail-we0-f182.google.com ([74.125.82.182]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XJ6Uh-0006cV-BL for pgsql-docs@postgresql.org; Sun, 17 Aug 2014 19:52:02 +0000 Received: by mail-we0-f182.google.com with SMTP id k48so4228705wev.27 for ; Sun, 17 Aug 2014 12:51:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MtCSmkFntjV8pqfNqx0QZZop9i4vwQZgCRFiwDhI5hU=; b=cMafQj5YnIEB9SK1u0QTzVkjC1aIyd6PpdXBV8PmgS93u6FKtTMODjALmuXu21pdqT Bxuu3ZVe0Tx77H2I9Y5wXnEQHATzlxP0AnhMX9w8s3VjXRSFt9D31Ez+NnVXwhyBZrpd Ak/O8DvQZKx+UJDX018Uj/IeHPxoPw/zCzyX1g5V6fhP+oDBGUJnBAzB2E9M44etH5jx CJD/K7GDfMc3Xc7aDsEhzi+1uplc16ae6LCF2QTPYGcCjbpWkup3xr4LBbDVI5pf731f pTJsQQWMqqGjsefzSTnxr3mppDaeUdk/sV0tn+KATMAXjaJ0nK4dsSjW0wZ0UTY467UR lHuA== X-Gm-Message-State: ALoCoQmFT6wpq3F0PRACzJA+lmRdRE40V8K09Hjh3vQzQTy1HI7EP2oBpjtRJUyhnVQUOxrPCQ3z MIME-Version: 1.0 X-Received: by 10.180.187.197 with SMTP id fu5mr70438736wic.64.1408305117316; Sun, 17 Aug 2014 12:51:57 -0700 (PDT) Received: by 10.195.13.45 with HTTP; Sun, 17 Aug 2014 12:51:57 -0700 (PDT) In-Reply-To: <1408305030.43830.YahooMailNeo@web122304.mail.ne1.yahoo.com> References: <53E5603B.5040102@agliodbs.com> <1407777686.41146.YahooMailNeo@web122306.mail.ne1.yahoo.com> <0F73426A2EA544878BCAC33BB989D671@maumau> <53EBCCEA.3090604@gmx.net> <1407965034.12878.YahooMailNeo@web122304.mail.ne1.yahoo.com> <1408305030.43830.YahooMailNeo@web122304.mail.ne1.yahoo.com> Date: Sun, 17 Aug 2014 21:51:57 +0200 Message-ID: Subject: Re: Sample archive_command is still problematic From: Magnus Hagander To: Kevin Grittner Cc: Peter Eisentraut , MauMau , Josh Berkus , "pgsql-docs@postgresql.org" Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On Sun, Aug 17, 2014 at 9:50 PM, Kevin Grittner wrote: > Magnus Hagander wrote: > >> On Wed, Aug 13, 2014 at 11:23 PM, Kevin Grittner wrote: > >> >>> The above is regarding WAL file archiving -- I'm not putting down >>> streaming replication. Of course, what I would have *really* liked >>> is a WAL receiver that could write out normal-looking WAL files for >>> archiving purposes and pass through the WAL stream to a hot >>> standby. Last I checked (which was admittedly at least a couple >>> years back) there was no such utility, although I seem to remember >>> that Magnus had done some work that looked like it could be bent to >>> that end. >> >> I did. But I think that has mostly been superceded by replication >> slots now. As in, if you use pg_receivexlog with a specific >> replication slot, I believe you no longer need archive command at all, >> do you? Since the replication slot will block rotation of the WAL >> files until they are actually archived by pg_receivexlog (What my >> command did was have an archive command that looked back into >> pg_stat_replication to see if pg_receivexlog had received the data or >> not). >> >> It did not pass through any WAL stream though - you'd have your >> standby connect directly to the same master that pg_receivexlog >> connects to. What would be the actual reason for having that one do >> the passthrough itself? > > The use case was to maintain both a hot standby and a set of WAL > files to allow PITR recovery (e.g., to recover to just before some > catastrophic SQL command was executed) to a remote site across a > *slow* WAN connection. Rather than send the WAL across the slow > connection twice they would ship and apply WAL files and suffer the > consequent replication delay to the hot standby; but if the standby > could be done through streaming replication and the WAL files could > still be re-created off of the same stream, that would be better. > > Basically, where bandwidth is limited and expensive, you don't want > to have to send the same WAL data over the same connection more > than once. Oh, now I remember. Different usecase, different tool :) That said, you can almost get there with pg_receivexlog - have it create the archives ,and use non-streaming replication on the slave... -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs