summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSimon Riggs2013-03-18 13:46:42 +0000
committerSimon Riggs2013-03-18 13:46:42 +0000
commitbb7cc2623f242ffafae404f8ebbb331b9a7f2b68 (patch)
treef51b5ac06db0cd66387ac8581c0c439db66a936b /contrib
parent4c855750fc0ba9bd30fa397eafbfee354908bbca (diff)
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.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/pageinspect/Makefile3
-rw-r--r--contrib/pageinspect/pageinspect.control2
-rw-r--r--contrib/pageinspect/rawpage.c2
3 files changed, 4 insertions, 3 deletions
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);