From bb7cc2623f242ffafae404f8ebbb331b9a7f2b68 Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Mon, 18 Mar 2013 13:46:42 +0000 Subject: Remove PageSetTLI and rename pd_tli to pd_checksum Remove use of PageSetTLI() from all page manipulation functions and adjust README to indicate change in the way we make changes to pages. Repurpose those bytes into the pd_checksum field and explain how that works in comments about page header. Refactoring ahead of actual feature patch which would make use of the checksum field, arriving later. Jeff Davis, with comments and doc changes by Simon Riggs Direction suggested by Robert Haas; many others providing review comments. --- contrib/pageinspect/Makefile | 3 ++- contrib/pageinspect/pageinspect.control | 2 +- contrib/pageinspect/rawpage.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'contrib') diff --git a/contrib/pageinspect/Makefile b/contrib/pageinspect/Makefile index 13ba6d39111..ce52151fade 100644 --- a/contrib/pageinspect/Makefile +++ b/contrib/pageinspect/Makefile @@ -4,7 +4,8 @@ MODULE_big = pageinspect OBJS = rawpage.o heapfuncs.o btreefuncs.o fsmfuncs.o EXTENSION = pageinspect -DATA = pageinspect--1.0.sql pageinspect--unpackaged--1.0.sql +DATA = pageinspect--1.0.sql pageinspect--unpackaged--1.0.sql \ + pageinspect--1.1.sql pageinspect--1.0--1.1.sql ifdef USE_PGXS PG_CONFIG = pg_config diff --git a/contrib/pageinspect/pageinspect.control b/contrib/pageinspect/pageinspect.control index f9da0e86edc..a412cf13ddb 100644 --- a/contrib/pageinspect/pageinspect.control +++ b/contrib/pageinspect/pageinspect.control @@ -1,5 +1,5 @@ # pageinspect extension comment = 'inspect the contents of database pages at a low level' -default_version = '1.0' +default_version = '1.1' module_pathname = '$libdir/pageinspect' relocatable = true diff --git a/contrib/pageinspect/rawpage.c b/contrib/pageinspect/rawpage.c index 222e043368b..e3ffaf4e4f2 100644 --- a/contrib/pageinspect/rawpage.c +++ b/contrib/pageinspect/rawpage.c @@ -211,7 +211,7 @@ page_header(PG_FUNCTION_ARGS) (uint32) (lsn >> 32), (uint32) lsn); values[0] = CStringGetTextDatum(lsnchar); - values[1] = UInt16GetDatum(PageGetTLI(page)); + values[1] = UInt16GetDatum(page->pd_checksum); values[2] = UInt16GetDatum(page->pd_flags); values[3] = UInt16GetDatum(page->pd_lower); values[4] = UInt16GetDatum(page->pd_upper); -- cgit v1.2.3