postgresql/contrib/pageinspect
Robert Haas 37484ad2aa Change the way we mark tuples as frozen.
Instead of changing the tuple xmin to FrozenTransactionId, the combination
of HEAP_XMIN_COMMITTED and HEAP_XMIN_INVALID, which were previously never
set together, is now defined as HEAP_XMIN_FROZEN.  A variety of previous
proposals to freeze tuples opportunistically before vacuum_freeze_min_age
is reached have foundered on the objection that replacing xmin by
FrozenTransactionId might hinder debugging efforts when things in this
area go awry; this patch is intended to solve that problem by keeping
the XID around (but largely ignoring the value to which it is set).

Third-party code that checks for HEAP_XMIN_INVALID on tuples where
HEAP_XMIN_COMMITTED might be set will be broken by this change.  To fix,
use the new accessor macros in htup_details.h rather than consulting the
bits directly.  HeapTupleHeaderGetXmin has been modified to return
FrozenTransactionId when the infomask bits indicate that the tuple is
frozen; use HeapTupleHeaderGetRawXmin when you already know that the
tuple isn't marked commited or frozen, or want the raw value anyway.
We currently do this in routines that display the xmin for user consumption,
in tqual.c where it's known to be safe and important for the avoidance of
extra cycles, and in the function-caching code for various procedural
languages, which shouldn't invalidate the cache just because the tuple
gets frozen.

Robert Haas and Andres Freund
2013-12-22 15:49:09 -05:00
..
Makefile Remove pageinspect--1.0.sql 2013-05-24 08:11:44 -04:00
btreefuncs.c Take buffer lock while inspecting btree index pages in contrib/pageinspect. 2012-11-30 17:03:31 -05:00
fsmfuncs.c Use cstring_to_text_with_len when length is known. 2013-11-18 10:19:00 -05:00
heapfuncs.c Change the way we mark tuples as frozen. 2013-12-22 15:49:09 -05:00
pageinspect--1.0--1.1.sql Fix typo in update scripts for some contrib modules. 2013-07-19 04:13:01 +09:00
pageinspect--1.1.sql Add pageinspect--1.1.sql for checksum changes 2013-03-18 14:19:06 +00:00
pageinspect--unpackaged--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
pageinspect.control Remove PageSetTLI and rename pd_tli to pd_checksum 2013-03-18 13:46:42 +00:00
rawpage.c Remove PageSetTLI and rename pd_tli to pd_checksum 2013-03-18 13:46:42 +00:00