From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Peter <pmc@citylink.dinoex.sub.org>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Something else about Redo Logs disappearing
Date: Tue, 09 Jun 2020 01:27:20 -0400
Message-ID: <2191826.1591680440@sss.pgh.pa.us> (raw)
In-Reply-To: <c5ae78f9-e922-29bc-379d-739baeb06e2f@aklaver.com>
References: <20200609000253.GA21670@gate.oper.dinoex.org>
<d105ee7a-19d5-3207-6311-a1dde37f95f5@aklaver.com>
<20200609023326.GA61487@gate.oper.dinoex.org>
<c5ae78f9-e922-29bc-379d-739baeb06e2f@aklaver.com>
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 6/8/20 7:33 PM, Peter wrote:
>> That "cp" is usually not synchronous. So there is the possibility
>> that this command terminates successfully, and reports exitcode zero
>> back to the Postgres, and then the Postgres will consider that log
>> being safely away.
> Which is why just following the above command in the docs is:
> "(This is an example, not a recommendation, and might not work on all
> platforms.) "
Yeah. There have been discussions about changing that disclaimer to be
more forceful, because in point of fact a plain "cp" is generally not safe
enough. You need to fsync the written file, and on many filesystems you
also have to fsync the directory it's in.
> Generally for peace of mind folks use third party tools like:
+1. Rolling your own archive script is seldom advisable.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, pmc@citylink.dinoex.sub.org
Subject: Re: Something else about Redo Logs disappearing
In-Reply-To: <2191826.1591680440@sss.pgh.pa.us>
References: <20200609000253.GA21670@gate.oper.dinoex.org> <d105ee7a-19d5-3207-6311-a1dde37f95f5@aklaver.com> <20200609023326.GA61487@gate.oper.dinoex.org> <c5ae78f9-e922-29bc-379d-739baeb06e2f@aklaver.com> <2191826.1591680440@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox