postgresql/src
Tom Lane 3cb29c42f9 Add static assertions about pg_control fitting into one disk sector.
When pg_control was first designed, sizeof(ControlFileData) was small
enough that a comment seemed like plenty to document the assumption that
it'd fit into one disk sector.  Now it's nearly 300 bytes, raising the
possibility that somebody would carelessly add enough stuff to create
a problem.  Let's add a StaticAssertStmt() to ensure that the situation
doesn't pass unnoticed if it ever occurs.

While at it, rename PG_CONTROL_SIZE to PG_CONTROL_FILE_SIZE to make it
clearer what that symbol means, and convert the existing runtime
comparisons of sizeof(ControlFileData) vs. PG_CONTROL_FILE_SIZE to be
static asserts --- we didn't have that technology when this code was
first written.

Discussion: https://postgr.es/m/9192.1500490591@sss.pgh.pa.us
2017-07-19 16:16:57 -04:00
..
backend Add static assertions about pg_control fitting into one disk sector. 2017-07-19 16:16:57 -04:00
bin Add static assertions about pg_control fitting into one disk sector. 2017-07-19 16:16:57 -04:00
common Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
fe_utils Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
include Add static assertions about pg_control fitting into one disk sector. 2017-07-19 16:16:57 -04:00
interfaces Translation updates 2017-07-10 11:53:55 -04:00
makefiles Always use -fPIC, not -fpic, when building shared libraries with gcc. 2017-06-01 13:32:55 -04:00
pl Translation updates 2017-07-10 11:53:55 -04:00
port Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
template Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
test Reverse-convert row types in ExecWithCheckOptions. 2017-07-17 21:56:31 -04:00
timezone Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
tools MSVC: Don't link libpgcommon into pgcrypto. 2017-07-16 23:13:58 -07:00
tutorial Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
.gitignore
DEVELOPERS
Makefile Remove redundant coverage target 2017-02-17 08:56:57 -05:00
Makefile.global.in Add ICU_CFLAGS to global CPPFLAGS 2017-06-12 15:57:22 -04:00
Makefile.shlib Remove support for bcc and msvc standalone libpq builds 2017-04-11 15:22:21 +02:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00