postgresql/src/include
Alexander Korotkov 8193d64072 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:31 +03:00
..
access Check for conflicting queries during replay of gistvacuumpage() 2018-12-21 02:37:31 +03:00
bootstrap Rationalize handling of array type names in bootstrap data. 2018-04-17 18:29:11 -04:00
catalog Make reformat-dat-files, reformat-dat-files VPATH safe. 2018-11-15 11:38:03 -08:00
commands Fix issues around EXPLAIN with JIT. 2018-10-03 13:11:44 -07:00
common Remove support for tls-unique channel binding. 2018-08-05 13:44:26 +03:00
datatype Update copyright for 2018 2018-01-02 23:30:12 -05:00
executor Advance transaction timestamp for intra-procedure transactions. 2018-10-08 16:16:36 -04:00
fe_utils Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER commands. 2018-08-17 17:12:21 -04:00
foreign Allow insert and update tuple routing and COPY for foreign tables. 2018-04-06 19:22:03 -04:00
jit Collect JIT instrumentation from workers. 2018-09-25 13:12:45 -07:00
lib Rename rbtree.c functions to use "rbt" prefix not "rb" prefix. 2018-11-06 13:25:24 -05:00
libpq Remove duplicate function declarations. 2018-08-14 14:25:14 -04:00
mb Fix a boatload of typos in C comments. 2018-04-01 15:01:28 -04:00
nodes Correct code comments for PartitionedRelPruneInfo struct 2018-11-15 23:06:29 +01:00
optimizer Repair bogus EPQ plans generated for postgres_fdw foreign joins. 2018-12-12 16:08:30 -05:00
parser Fix INSERT ON CONFLICT UPDATE through a view that isn't just SELECT *. 2018-08-04 19:38:58 -04:00
partitioning Fix run-time partition pruning for appends with multiple source rels. 2018-08-01 19:42:53 -04:00
port Fix misc typos, mostly in comments. 2018-07-18 16:17:42 +03:00
portability Update copyright for 2018 2018-01-02 23:30:12 -05:00
postmaster Add comment explaining BGWORKER_BYPASS_ALLOWCONN 2018-04-23 10:31:22 +02:00
regex Update copyright for 2018 2018-01-02 23:30:12 -05:00
replication Fix memory leak in TRUNCATE decoding 2018-09-03 02:29:51 +02:00
rewrite Revert MERGE patch 2018-04-12 11:22:56 +01:00
snowball Update copyright for 2018 2018-01-02 23:30:12 -05:00
statistics Update copyright for 2018 2018-01-02 23:30:12 -05:00
storage PANIC on fsync() failure. 2018-11-19 13:37:59 +13:00
tcop Fix event triggers for partitioned tables 2018-10-06 19:17:46 -03:00
tsearch Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
utils Fix missing role dependencies for some schema and type ACLs. 2018-11-09 20:42:03 -05:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Allow btree comparison functions to return INT_MIN. 2018-10-05 16:01:29 -04:00
fmgr.h Add expression compilation support to LLVM JIT provider. 2018-03-22 14:45:59 -07:00
funcapi.h Support INOUT arguments in procedures 2018-03-14 12:07:28 -04:00
getaddrinfo.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
getopt_long.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
Makefile Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
miscadmin.h Allow group access on PGDATA 2018-04-07 17:45:39 -04:00
pg_config.h.in Fix detection of the result type of strerror_r(). 2018-09-30 16:24:56 -04:00
pg_config.h.win32 Stamp 11.1. 2018-11-05 16:43:09 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Improve error reporting for unsupported effective_io_concurrency setting. 2018-09-28 16:12:13 -04:00
pg_getopt.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_trace.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgstat.h Revert "Allow on-line enabling and disabling of data checksums" 2018-04-09 19:03:42 +02:00
pgtar.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgtime.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
port.h Improve detection of child-process SIGPIPE failures. 2018-12-16 14:32:14 -05:00
postgres.h Detoast plpgsql variables if they might live across a transaction boundary. 2018-05-16 14:56:52 -04:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
rusagestub.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
windowapi.h Update copyright for 2018 2018-01-02 23:30:12 -05:00