postgresql/src/backend
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
..
access Check for conflicting queries during replay of gistvacuumpage() 2018-12-21 02:37:37 +03:00
bootstrap Make type "name" collation-aware. 2018-12-19 17:46:25 -05:00
catalog Base information_schema.sql_identifier domain on name, not varchar. 2018-12-20 16:21:59 -05:00
commands Fix lock level used for partition when detaching it 2018-12-20 16:42:13 -03:00
executor Remove extra semicolons. 2018-12-17 14:32:25 +05:30
foreign Introduce new extended routines for FDW and foreign server lookups 2018-12-14 08:59:35 +09:00
jit Fix jit compilation bug on wide tables. 2018-11-27 10:07:03 -08:00
lib Rename rbtree.c functions to use "rbt" prefix not "rb" prefix. 2018-11-06 13:25:24 -05:00
libpq Fix typo 2018-12-04 11:04:54 -05:00
main Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodes Make type "name" collation-aware. 2018-12-19 17:46:25 -05:00
optimizer Add text-vs-name cross-type operators, and unify name_ops with text_ops. 2018-12-19 17:46:25 -05:00
parser Make type "name" collation-aware. 2018-12-19 17:46:25 -05:00
partitioning Reduce unnecessary list construction in RelationBuildPartitionDesc. 2018-11-19 12:10:41 -05:00
po Translation updates 2018-06-25 12:37:18 +02:00
port Fix spelling errors and typos in comments 2018-11-02 13:56:52 +01:00
postmaster Modernize our code for looking up descriptive strings for Unix signals. 2018-12-16 19:38:57 -05:00
regex Clean up warnings from -Wimplicit-fallthrough. 2018-05-01 19:35:08 -04:00
replication Add timestamp of last received message from standby to pg_stat_replication 2018-12-09 16:35:06 +09:00
rewrite Remove WITH OIDS support, change oid catalog column visibility. 2018-11-20 16:00:17 -08:00
snowball Sync our Snowball stemmer dictionaries with current upstream. 2018-09-24 17:29:38 -04:00
statistics Make pg_statistic and related code account more honestly for collations. 2018-12-14 12:52:49 -05:00
storage Have BufFileSize() ereport() on FileSize() failure. 2018-11-28 14:42:54 -08:00
tcop Silence compiler warning 2018-11-30 10:20:49 -03:00
tsearch Make pg_statistic and related code account more honestly for collations. 2018-12-14 12:52:49 -05:00
utils Avoid producing over-length specific_name outputs in information_schema. 2018-12-20 16:21:59 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Integrate recovery.conf into postgresql.conf 2018-11-25 16:33:40 +01:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Translation updates 2018-06-25 12:37:18 +02:00