pgsql: Refactor checksumming code to make it easier to use externally.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Refactor checksumming code to make it easier to use externally.
Date: 2013-06-14 02:36:22
Message-ID: E1UnJsE-0006ut-Kj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f04216341dd1cc235e975f93ac806d9d3729a344

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 6 +-
src/backend/storage/page/bufpage.c | 99 +++++------------
src/backend/storage/page/checksum.c | 146 +-----------------------
src/include/storage/checksum.h | 9 +-
src/include/storage/checksum_impl.h | 207 +++++++++++++++++++++++++++++++++++
5 files changed, 251 insertions(+), 216 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-06-14 03:15:23 pgsql: Remove special-case treatment of LOG severity level in standalon
Previous Message Peter Eisentraut 2013-06-14 01:49:04 pgsql: PL/Python: Fix type mixup