Re: Is pg_control file crashsafe?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Subject: Re: Is pg_control file crashsafe?
Date: 2016-05-02 23:17:42
Message-ID: 17675.1462231062@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru> writes:
> I think that rename can help a little bit. At least on some FS it is
> atomic operation.

Writing a single sector ought to be atomic too. I'm very skeptical that
it'll be an improvement to just move the risk from one filesystem
operation to another; especially not to one where there's not even a
terribly portable way to request fsync.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-05-02 23:21:39 Re: Is pg_control file crashsafe?
Previous Message Andres Freund 2016-05-02 22:14:19 Re: [BUGS] Breakage with VACUUM ANALYSE + partitions