postgresql/src/include/access
Alexander Korotkov c952eae52a Check for conflicting queries during replay of gistvacuumpage()
013ebc0a7b implements so-called GiST microvacuum.  That is gistgettuple() marks
index tuples as dead when kill_prior_tuple is set.  Later, when new tuple
insertion claims page space, those dead index tuples are physically deleted
from page.  When this deletion is replayed on standby, it might conflict with
read-only queries.  But 013ebc0a7b doesn't handle this.  That may lead to
disappearance of some tuples from read-only snapshots on standby.

This commit implements resolving of conflicts between replay of GiST microvacuum
and standby queries.  On the master we implement new WAL record type
XLOG_GIST_DELETE, which comprises necessary information.  On stable releases
we've to be tricky to keep WAL compatibility.  Information required for conflict
processing is just appended to data of XLOG_GIST_PAGE_UPDATE record.  So,
PostgreSQL version, which doesn't know about conflict processing, will just
ignore that.

Reported-by: Andres Freund
Diagnosed-by: Andres Freund
Discussion: https://postgr.es/m/20181212224524.scafnlyjindmrbe6%40alap3.anarazel.de
Author: Alexander Korotkov
Backpatch-through: 9.6
2018-12-21 02:37:37 +03:00
..
amapi.h Support index INCLUDE in the AM properties interface. 2018-04-08 06:02:05 +01:00
amvalidate.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
attnum.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
brin.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
brin_internal.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
brin_page.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
brin_pageops.h Improve FSM management for BRIN indexes. 2018-04-04 14:26:04 -04:00
brin_revmap.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
brin_tuple.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
brin_xlog.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
bufmask.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
clog.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
commit_ts.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
genam.h Add support for nearest-neighbor (KNN) searches to SP-GiST 2018-09-19 01:54:10 +03:00
generic_xlog.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
gin.h Use stdbool.h if suitable 2018-03-22 20:42:25 -04:00
gin_private.h Rename rbtree.c functions to use "rbt" prefix not "rb" prefix. 2018-11-06 13:25:24 -05:00
ginblock.h Prevent GIN deleted pages from being reclaimed too early 2018-12-13 06:55:34 +03:00
ginxlog.h Prevent GIN deleted pages from being reclaimed too early 2018-12-13 06:55:34 +03:00
gist.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
gist_private.h Check for conflicting queries during replay of gistvacuumpage() 2018-12-21 02:37:37 +03:00
gistscan.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
gistxlog.h Check for conflicting queries during replay of gistvacuumpage() 2018-12-21 02:37:37 +03:00
hash.h Fix the overrun in hash index metapage for smaller block sizes. 2018-09-06 09:27:19 +05:30
hash_xlog.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
heapam.h Remove WITH OIDS support, change oid catalog column visibility. 2018-11-20 16:00:17 -08:00
heapam_xlog.h Fix incorrect routine name in xlog_heapam.h 2018-11-10 08:58:55 +09:00
hio.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
htup.h Add FIELDNO_* macro designating offset into structs required for JIT. 2018-03-22 14:45:59 -07:00
htup_details.h Remove WITH OIDS support, change oid catalog column visibility. 2018-11-20 16:00:17 -08:00
itup.h Adjust INCLUDE index truncation comments and code. 2018-04-19 08:45:58 +03:00
multixact.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
nbtree.h Allow btree comparison functions to return INT_MIN. 2018-10-05 16:01:29 -04:00
nbtxlog.h Fix datatype for number of heap tuples during last cleanup 2018-04-19 11:28:03 +03:00
parallel.h Support parallel btree index builds. 2018-02-02 13:32:44 -05:00
printsimple.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
printtup.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
reloptions.h Remove WITH OIDS support, change oid catalog column visibility. 2018-11-20 16:00:17 -08:00
relscan.h Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
rewriteheap.h Comment fix for rewriteheap.h. 2018-08-25 09:17:14 -07:00
rmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rmgrlist.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
sdir.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
session.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
skey.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
slru.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
spgist.h Add support for nearest-neighbor (KNN) searches to SP-GiST 2018-09-19 01:54:10 +03:00
spgist_private.h Add support for nearest-neighbor (KNN) searches to SP-GiST 2018-09-19 01:54:10 +03:00
spgxlog.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
stratnum.h Add prefix operator for TEXT type. 2018-04-03 19:46:45 +03:00
subtrans.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
sysattr.h Remove WITH OIDS support, change oid catalog column visibility. 2018-11-20 16:00:17 -08:00
timeline.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
transam.h Create a separate oid range for oids assigned by genbki.pl. 2018-12-13 14:50:57 -08:00
tsmapi.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
tupconvert.h Use slots more widely in tuple mapping code and make naming more consistent. 2018-10-02 11:14:26 -07:00
tupdesc.h Remove WITH OIDS support, change oid catalog column visibility. 2018-11-20 16:00:17 -08:00
tupdesc_details.h Cosmetic improvements for faster column addition. 2018-06-27 08:16:13 +05:30
tupmacs.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
tuptoaster.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
twophase.h Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
twophase_rmgr.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
valid.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
visibilitymap.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
xact.h Propagate xactStartTimestamp and stmtStartTimestamp to parallel workers. 2018-10-06 12:00:09 -04:00
xlog.h Integrate recovery.conf into postgresql.conf 2018-11-25 16:33:40 +01:00
xlog_internal.h Flip argument order in XLogSegNoOffsetToRecPtr 2018-07-09 14:33:38 -04:00
xlogdefs.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
xloginsert.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
xlogreader.h Improve description of buffer used to store records in WAL reader 2018-11-21 08:43:32 +09:00
xlogrecord.h Cleanup comments in xlog compression 2018-12-06 11:05:39 -05:00
xlogutils.h Update copyright for 2018 2018-01-02 23:30:12 -05:00