Re: pg_verify_checksums and -fno-strict-aliasing
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>,
Michael Banck <michael.banck@credativ.de>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-09-01T05:24:38Z
Lists: pgsql-hackers
Hello, >> Okay, for the memo replay_image_masked and master_image_masked >> in xlog.c could make use of the new structure. SetWALSegSize in >> pg_standby.c and WriteEmptyXLOG in pg_resetwal.c, and pg_upgrade's >> file.c could also be patched. > > I intentionally didn't change replay_image_masked/master_image_masked > to use statically-allocated buffers. Since, AFAICS, those aren't > needed in most backend processes, they'd just be eating 16KB of > per-process data space to no purpose. > > The others you mention could be changed, probably, but I didn't > bother as they didn't seem performance-critical. I'd go for having just one same approach everywhere, for code base homogeneity. >>> +typedef union PGAlignedBuffer > >> One complain I have is about the name of those structures. Perhaps >> PGAlignedBlock and PGAlignedXlogBlock make more sense? > > Don't have a strong preference, anybody else have an opinion? I like "Block" better, because it's more precise. > (I also wondered whether to use "WAL" instead of "XLog" in that > struct name, but it seems like we've mostly stuck with "xlog" > in internal C names.) Best to blend with the surrounding code in the header file? -- Fabien.
Commits
-
Avoid using potentially-under-aligned page buffers.
- 44cac9346479 12.0 landed
- 5af055ed7446 9.3.25 landed
- f5c93cf92223 11.0 landed
- 826980424538 9.6.11 landed
- 10b9af3ebbed 10.6 landed
- 083d9ced14e4 9.4.20 landed
- 03ffe5553c1d 9.5.15 landed
-
Code review for pg_verify_checksums.c.
- d787af7badfe 11.0 landed
- d9c366f9e801 12.0 landed
-
Make checksum_impl.h safe to compile with -fstrict-aliasing.
- db87d3b5253f 9.3.25 landed
- 20f9cd55dd53 9.4.20 landed
- 853af991e35a 9.5.15 landed
- d6ef17ed7bba 9.6.11 landed
- c2dfbd18ce25 10.6 landed
- 9daff2fe69dc 11.0 landed
- 8c62d9d16f01 12.0 landed