]> granicus.if.org Git - postgresql/commit
Refactor checksumming code to make it easier to use externally.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Jun 2013 02:35:56 +0000 (22:35 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Jun 2013 02:35:56 +0000 (22:35 -0400)
commitf04216341dd1cc235e975f93ac806d9d3729a344
tree803d65ef30cc32456bc2798d76ec04e5513fbd12
parentfa2fc066f34f1b631b5f92f11e7cda9f60a25330
Refactor checksumming code to make it easier to use externally.

pg_filedump and other external utility programs are likely to want to be
able to check Postgres page checksums.  To avoid messy duplication of code,
move the checksumming functionality into an exported header file, much as
we did awhile back for the CRC code.

In passing, get rid of an unportable assumption that a static char[] array
will be word-aligned, and do some other minor code beautification.
src/backend/storage/buffer/bufmgr.c
src/backend/storage/page/bufpage.c
src/backend/storage/page/checksum.c
src/include/storage/checksum.h
src/include/storage/checksum_impl.h [new file with mode: 0644]