Re: Something for the TODO list: deprecating abstime and friends

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Mark Dilger <hornschnorter(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Something for the TODO list: deprecating abstime and friends
Date: 2017-07-19 18:56:31
Message-ID: 9192.1500490591@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Hm. Currently sizeof(struct ControlFileData) = 296, at least on my
> machine. Letting it grow past 512 would be problematic. It's hard
> to see getting to that any time soon, though; we don't add fields
> there often.

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");

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2017-07-19 18:59:14 Re: Patch: Add --no-comments to skip COMMENTs with pg_dump
Previous Message Robins Tharakan 2017-07-19 18:54:15 Re: Patch: Add --no-comments to skip COMMENTs with pg_dump