Re: Something for the TODO list: deprecating abstime and friends
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>,
Mark Dilger <hornschnorter@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-07-19T19:04:09Z
Lists: pgsql-hackers
On Wed, Jul 19, 2017 at 8:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > I wonder if it'd be worth the trouble to stick something like this into > xlog.c: > > /* > * For reliability's sake, it's critical that pg_control updates > * be atomic writes. That generally means the active data can't > * be more than one disk sector, which is 512 bytes on common > * hardware. Be very careful about raising this limit. > */ > StaticAssertStmt(sizeof(ControlFileData) <= 512, > "pg_control is too large for atomic disk writes"); +1. Even if it just gets triggered in 20 years by some hacker, that's a good reminder about assumptions behind the update logic. -- Michael
Commits
-
Add static assertions about pg_control fitting into one disk sector.
- 3cb29c42f990 10.0 landed
-
doc: Remove PostgreSQL version number from xml2 deprecation notice
- 3163baa6d2d1 9.3.0 cited