postgresql/src/include
Noah Misch 7da83415e5 Revive "snapshot too old" with wal_level=minimal and SET TABLESPACE.
Given a permanent relation rewritten in the current transaction, the
old_snapshot_threshold mechanism assumed the relation had never been
subject to early pruning.  Hence, a query could fail to report "snapshot
too old" when the rewrite followed an early truncation.  ALTER TABLE SET
TABLESPACE is probably the only rewrite mechanism capable of exposing
this bug.  REINDEX sets indcheckxmin, avoiding the problem.  CLUSTER has
zeroed page LSNs since before old_snapshot_threshold existed, so
old_snapshot_threshold has never cooperated with it.  ALTER TABLE
... SET DATA TYPE makes the table look empty to every past snapshot,
which is strictly worse.  Back-patch to v13, where commit
c6b92041d3 broke this.

Kyotaro Horiguchi and Noah Misch

Discussion: https://postgr.es/m/20210113.160705.2225256954956139776.horikyota.ntt@gmail.com
2021-01-30 00:12:18 -08:00
..
access Set PD_ALL_VISIBLE and visibility map bits in COPY FREEZE 2021-01-17 22:28:26 +01:00
bootstrap Update copyright for 2021 2021-01-02 13:06:25 -05:00
catalog Add bytea equivalents of ltrim() and rtrim(). 2021-01-18 15:11:32 -05:00
commands Refactor code in tablecmds.c to check and process tablespace moves 2021-01-27 11:54:16 +09:00
common Introduce SHA1 implementations in the cryptohash infrastructure 2021-01-23 11:33:04 +09:00
datatype Update copyright for 2021 2021-01-02 13:06:25 -05:00
executor Rethink recently-added SPI interfaces. 2021-01-26 16:37:12 -05:00
fe_utils Update copyright for 2021 2021-01-02 13:06:25 -05:00
foreign Implement support for bulk inserts in postgres_fdw 2021-01-20 23:57:27 +01:00
jit Update copyright for 2021 2021-01-02 13:06:25 -05:00
lib Update copyright for 2021 2021-01-02 13:06:25 -05:00
libpq Update copyright for 2021 2021-01-02 13:06:25 -05:00
mb Add mbverifystr() functions specific to each encoding. 2021-01-28 14:40:07 +02:00
nodes Implement support for bulk inserts in postgres_fdw 2021-01-20 23:57:27 +01:00
optimizer Fix pull_varnos' miscomputation of relids set for a PlaceHolderVar. 2021-01-21 15:37:23 -05:00
parser Re-implement pl/pgsql's expression and assignment parsing. 2021-01-04 11:52:00 -05:00
partitioning Fix hash partition pruning with asymmetric partition sets. 2021-01-28 13:41:55 -05:00
port Minor header cleanup for the new iovec code. 2021-01-14 18:30:17 +13:00
portability Update copyright for 2021 2021-01-02 13:06:25 -05:00
postmaster Update copyright for 2021 2021-01-02 13:06:25 -05:00
regex Update copyright for 2021 2021-01-02 13:06:25 -05:00
replication Allow decoding at prepare time in ReorderBuffer. 2021-01-04 08:34:50 +05:30
rewrite Update copyright for 2021 2021-01-02 13:06:25 -05:00
snowball Update copyright for 2021 2021-01-02 13:06:25 -05:00
statistics Update copyright for 2021 2021-01-02 13:06:25 -05:00
storage Fix CREATE INDEX CONCURRENTLY for simultaneous prepared transactions. 2021-01-30 00:00:27 -08:00
tcop Update copyright for 2021 2021-01-02 13:06:25 -05:00
tsearch Update copyright for 2021 2021-01-02 13:06:25 -05:00
utils Revive "snapshot too old" with wal_level=minimal and SET TABLESPACE. 2021-01-30 00:12:18 -08:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
c.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
fmgr.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
funcapi.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
getaddrinfo.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
getopt_long.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
miscadmin.h Add idle_session_timeout. 2021-01-06 18:28:52 -05:00
pg_config.h.in Provide pg_preadv() and pg_pwritev(). 2021-01-11 15:24:38 +13: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_manual.h Replace CLOBBER_CACHE_ALWAYS with run-time GUC 2021-01-06 10:46:44 +01:00
pg_getopt.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_trace.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pgstat.h Bump PGSTAT_FILE_FORMAT_ID 2021-01-18 17:51:49 +01:00
pgtar.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pgtime.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
port.h Provide pg_preadv() and pg_pwritev(). 2021-01-11 15:24:38 +13:00
postgres.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
rusagestub.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
windowapi.h Update copyright for 2021 2021-01-02 13:06:25 -05:00