postgresql/src/include/access
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
..
attnum.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
clog.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
genam.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
gin.h Get rid of the post-recovery cleanup step of GIN page splits. 2013-11-27 19:21:23 +02:00
gin_private.h Get rid of the post-recovery cleanup step of GIN page splits. 2013-11-27 19:21:23 +02:00
gist.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
gist_private.h Support unlogged GiST index. 2013-02-11 23:07:09 +02:00
gistscan.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
hash.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
heapam.h Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. 2013-07-02 09:47:01 -04:00
heapam_xlog.h Change the way we mark tuples as frozen. 2013-12-22 15:49:09 -05:00
hio.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
htup.h Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
htup_details.h Change the way we mark tuples as frozen. 2013-12-22 15:49:09 -05:00
itup.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
multixact.h Don't ignore tuple locks propagated by our updates 2013-12-18 13:45:51 -03:00
nbtree.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
printtup.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
reloptions.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
relscan.h Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. 2013-07-02 09:47:01 -04:00
rewriteheap.h Rename various "freeze multixact" variables 2013-09-16 15:47:31 -03:00
rmgr.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
rmgrlist.h Get rid of the post-recovery cleanup step of GIN page splits. 2013-11-27 19:21:23 +02:00
sdir.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
skey.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
slru.h Fix pg_upgrade failure from servers older than 9.3 2013-08-19 12:56:18 -04:00
spgist.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
spgist_private.h Avoid deadlocks during insertion into SP-GiST indexes. 2013-06-14 14:26:43 -04:00
subtrans.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
sysattr.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
timeline.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
transam.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
tupconvert.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
tupdesc.h Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. 2013-11-21 19:37:20 -05:00
tupmacs.h Consistently use unsigned arithmetic for alignment calculations. 2013-10-20 21:04:52 -04:00
tuptoaster.h Get rid of pg_class.reltoastidxid. 2013-07-04 03:24:09 +09:00
twophase.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
twophase_rmgr.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
valid.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
visibilitymap.h Allow I/O reliability checks using 16-bit checksums 2013-03-22 13:54:07 +00:00
xact.h Add new wal_level, logical, sufficient for logical decoding. 2013-12-10 19:01:40 -05:00
xlog.h Rename wal_log_hintbits to wal_log_hints, per discussion on pgsql-hackers. 2013-12-21 03:33:16 +09:00
xlog_fn.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
xlog_internal.h Change the way we mark tuples as frozen. 2013-12-22 15:49:09 -05:00
xlogdefs.h Improve scalability of WAL insertions. 2013-07-08 11:23:56 +03:00
xlogreader.h Use the right timeline when beginning to stream from master. 2013-01-18 11:46:49 +02:00
xlogutils.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00