postgresql/src
Andres Freund 42750b08d9 Ensure snapshot is registered within ScanPgRelation().
In 9.4 I added support to use a historical snapshot in
ScanPgRelation(), while adding logical decoding. Unfortunately a
conflict with the concurrent removal of SnapshotNow was incorrectly
resolved, leading to an unregistered snapshot being used.

It is not correct to use an unregistered (or non-active) snapshot for
anything non-trivial, because catalog invalidations can cause the
snapshot to be invalidated.

Luckily it seems unlikely to actively cause problems in practice, as
ScanPgRelation() requires that we already have a lock on the relation,
we only look for a single row, and we don't appear to rely on the
result's tid to be correct. It however is clearly wrong and potential
negative consequences would likely be hard to find. So it seems worth
backpatching the fix, even without a concrete hazard.

Discussion: https://postgr.es/m/20200229052459.wzhqnbhrriezg4v2@alap3.anarazel.de
Backpatch: 9.5-
2020-03-28 12:26:46 -07:00
..
backend Ensure snapshot is registered within ScanPgRelation(). 2020-03-28 12:26:46 -07:00
bin Enable Unix-domain sockets support on Windows 2020-03-28 15:01:01 +01:00
common Add support for other normal forms to Unicode normalization API 2020-03-24 10:02:46 +01:00
fe_utils Fix bug in pg_basebackup -F plain -R. 2020-02-12 09:08:22 +09:00
include Enable Unix-domain sockets support on Windows 2020-03-28 15:01:01 +01:00
interfaces Fix issues around .pgpass file. 2020-03-05 13:00:38 +09:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Rearrange validity checks for plpgsql "simple" expressions. 2020-03-27 14:47:34 -04:00
port Fix our getopt_long's behavior for a command line argument of just "-". 2020-03-23 11:58:00 -04:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Improve the performance and accuracy of numeric sqrt() and ln(). 2020-03-28 14:37:53 +00:00
timezone Require stdint.h 2020-02-21 09:20:32 +01:00
tools Enable Unix-domain sockets support on Windows 2020-03-28 15:01:01 +01:00
tutorial Update copyrights for 2020 2020-01-01 12:21:45 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00