postgresql/src/backend
Peter Geoghegan ce2cee0ade Fix nbtree kill_prior_tuple posting list assert.
An assertion added by commit 0d861bbb checked that _bt_killitems() only
processes a BTScanPosItem whose heap TID is contained in a posting list
tuple when its page offset number still matches what is on the page
(i.e. when it matches the posting list tuple's current offset number).
This was only correct in the common case where the page can't have
changed since we first read it.  It was not correct in cases where we
don't drop the buffer pin (and don't need to verify the page hasn't
changed using its LSN).  The latter category includes scans involving
unlogged tables, and scans that use a non-MVCC snapshot, per the logic
originally introduced by commit 2ed5b87f.

The assertion still seems helpful.  Fix it by taking cases where the
page may have been concurrently modified into account.

Reported-By: Anastasia Lubennikova, Alexander Lakhin
Discussion: https://postgr.es/m/c4e38e9a-0f9c-8e53-e639-adf343f94472@postgrespro.ru
2020-04-06 14:46:33 -07:00
..
access Fix nbtree kill_prior_tuple posting list assert. 2020-04-06 14:46:33 -07:00
bootstrap Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
catalog Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
commands Fix show_incremental_sort_info with force_parallel_mode 2020-04-06 23:19:13 +02:00
executor Implement Incremental Sort 2020-04-06 21:35:10 +02:00
foreign
jit
lib
libpq Provide a TLS init hook 2020-03-25 17:13:17 -04:00
main
nodes Implement Incremental Sort 2020-04-06 21:35:10 +02:00
optimizer Implement Incremental Sort 2020-04-06 21:35:10 +02:00
parser Remove bogus Assert, add some regression test cases showing why. 2020-04-04 18:03:30 -04:00
partitioning Add object names to partition integrity violations. 2020-03-23 08:09:15 +05:30
po
port
postmaster Recompute stack base in forked postmaster children. 2020-04-05 18:23:30 -07:00
regex
replication Add logical replication support to replicate into partitioned tables 2020-04-06 15:15:52 +02:00
rewrite Fix INSERT OVERRIDING USER VALUE behavior 2020-03-31 08:50:39 +02:00
snowball
statistics Fix race condition in statext_store(). 2020-03-31 17:06:22 -04:00
storage Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
tcop Improve user control over truncation of logged bind-parameter values. 2020-04-02 15:04:51 -04:00
tsearch Remove useless pfree()s at the ends of various ValuePerCall SRFs. 2020-03-16 21:36:53 -04:00
utils Implement Incremental Sort 2020-04-06 21:35:10 +02:00
.gitignore
common.mk
Makefile
nls.mk