From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net>, MauMau <maumau307(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-docs(at)postgresql(dot)org" <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: Sample archive_command is still problematic |
Date: | 2014-08-13 21:23:54 |
Message-ID: | 1407965034.12878.YahooMailNeo@web122304.mail.ne1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On 8/11/14 6:23 PM, MauMau wrote:
>
>> I submitted a patch a patch for this a few months ago, which is pg_copy
>> listed in the current CF. The patch also addresses the problem that the
>> archived file can get lost after power failure because it is not flushed
>> to disk. The patch consists of a program called pg_copy which can be
>> used instead of cp/copy, and a doc fix to suggest using mv. I made it
>> following the favorable suggestions from people.
>
> I realize that there are about 128 different ways people set this up
> (which is itself a problem), but it appears to me that a solution like
> pg_copy only provides local copying, which implies the use of something
> like NFS.
Not necessarily. What I have done is to use the cp/mv technique on
the database server and then rsync (through ssh) from each place
that needs it. That seems to me much less fragile than copying to
an NFS mount point.
> Also, I think you can get local copy+fsync with dd.
Does the directory entry only become visible to other processes
once the file is complete when you use dd?
> The alternatives of doing remote copying inside archive_command are also
> questionable if you have multiple standbys.
Right. It's a nightmare to try to design anything to serve
multiple standbys without having the initial archive be local and
copying from that archive to the others. At least, if there is
some other good solution, I have yet to see it.
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.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | MauMau | 2014-08-14 03:32:47 | Re: Sample archive_command is still problematic |
Previous Message | Peter Eisentraut | 2014-08-13 20:39:06 | Re: Sample archive_command is still problematic |