Re: Is pg_control file crashsafe? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Is pg_control file crashsafe?
Date
Msg-id 18553.1462422749@sss.pgh.pa.us
Whole thread Raw
In response to Re: Is pg_control file crashsafe?  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Is pg_control file crashsafe?
Re: Is pg_control file crashsafe?
Re: Is pg_control file crashsafe?
List pgsql-hackers
Amit Kapila <amit.kapila16@gmail.com> writes:
> How about using 512 bytes as a write size and perform direct writes rather
> than going via OS buffer cache for control file?

Wouldn't that fail outright under a lot of implementations of direct write;
ie the request needs to be page-aligned, for some not-very-determinate
value of page size?

To repeat, I'm pretty hesitant to change this logic.  While this is not
the first report we've ever heard of loss of pg_control, I believe I could
count those reports without running out of fingers on one hand --- and
that's counting since the last century. It will take quite a lot of
evidence to convince me that some other implementation will be more
reliable.  If you just come and present a patch to use direct write, or
rename, or anything else for that matter, I'm going to reject it out of
hand unless you provide very strong evidence that it's going to be more
reliable than the current code across all the systems we support.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Is pg_control file crashsafe?
Next
From: Amit Kapila
Date:
Subject: Re: what to revert