public inbox for [email protected]
help / color / mirror / Atom feedFrom: Frank Wiles <[email protected]>
To: [email protected]
Subject: wal shipping/pg_standby docs patch
Date: Wed, 25 Mar 2009 14:20:51 -0500
Message-ID: <[email protected]> (raw)
Hello,
It has been awhile since I setup a warm standby server, so I dutifully
followed the documentation. However, the documentation specifically
suggests using 'cp -i' as the archive command. Granted, it does say
that it is only a suggestion and not a recommendation, but does
specifically mention it for Linux.
Wasn't three days before I was bitten by transferring a WAL file
before it was fully copied into the archive location.
Attached is a patch that makes the suggestion be 'rsync -avr' in both
backup.sgml and pg_standby.sgml.
Thanks!
--
Frank Wiles
Revolution Systems | http://www.revsys.com/
[email protected] | (800) 647-6298
Attachments:
[text/x-diff] rsync-doc.patch (1.4K, 2-rsync-doc.patch)
download | inline diff:
diff -ur postgresql-snapshot/doc/src/sgml/backup.sgml my-postgresql/doc/src/sgml/backup.sgml
--- postgresql-snapshot/doc/src/sgml/backup.sgml 2009-03-05 13:50:03.000000000 -0600
+++ my-postgresql/doc/src/sgml/backup.sgml 2009-03-25 13:35:24.000000000 -0500
@@ -564,7 +564,7 @@
</programlisting>
which will copy archivable WAL segments to the directory
<filename>/mnt/server/archivedir</>. (This is an example, not a
- recommendation, and might not work on all platforms.) After the
+ recommendation, and might not work on all platforms. It is highly recommend you use a tool that does atomic copies such as <programlisting>rsync -arv %p...</programlisting>) After the
<literal>%p</> and <literal>%f</> parameters have been replaced,
the actual command executed might look like this:
<programlisting>
diff -ur postgresql-snapshot/doc/src/sgml/pgstandby.sgml my-postgresql/doc/src/sgml/pgstandby.sgml
--- postgresql-snapshot/doc/src/sgml/pgstandby.sgml 2009-02-27 03:30:21.000000000 -0600
+++ my-postgresql/doc/src/sgml/pgstandby.sgml 2009-03-25 13:27:42.000000000 -0500
@@ -207,7 +207,7 @@
<para>On Linux or Unix systems, you might use:</para>
<programlisting>
-archive_command = 'cp %p .../archive/%f'
+archive_command = 'rsync -arz %p .../archive/%f'
restore_command = 'pg_standby -l -d -s 2 -t /tmp/pgsql.trigger.5442 .../archive %f %p %r 2>>standby.log'
</programlisting>
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: wal shipping/pg_standby docs patch
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox