Re: [patch] pg_copy - a command for reliable WAL archiving - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [patch] pg_copy - a command for reliable WAL archiving
Date
Msg-id 9368.1408544373@sss.pgh.pa.us
Whole thread Raw
In response to Re: [patch] pg_copy - a command for reliable WAL archiving  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: [patch] pg_copy - a command for reliable WAL archiving
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-08-20 09:50:56 -0400, Alvaro Herrera wrote:
>> Andres Freund wrote:
>>> Isn't this a solution looking for a problem? We're using tempfiles in
>>> dozens of other places and I really don't see why this is the place to
>>> stop doing so. Just copy to <dest>.tmp and move it into place.

>> The issue is what happens if there's a crash while the temp file is in
>> the middle of being filled.

> The archive command will be be run again a couple seconds and remove the
> half-filled temp file.

Alternatively, you could use the process PID as part of the temp file
name; which is probably a good idea anyway.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: pg_basebackup vs. Windows and tablespaces
Next
From: Andres Freund
Date:
Subject: Re: [patch] pg_copy - a command for reliable WAL archiving