postgresql/src/backend
Thomas Munro b1df6b696b Fix potential SSI hazard in heap_update().
Commit 6f38d4dac3 failed to heed a warning about the stability of the
value pointed to by "otid".  The caller is allowed to pass in a pointer to
newtup->t_self, which will be updated during the execution of the
function.  Instead, the SSI check should use the value we copy into
oldtup.t_self near the top of the function.

Not a live bug, because newtup->t_self doesn't really get updated until
a bit later, but it was confusing and broke the rule established by the
comment.

Back-patch to 13.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/2689164.1618160085%40sss.pgh.pa.us
2021-04-13 13:02:56 +12:00
..
access Fix potential SSI hazard in heap_update(). 2021-04-13 13:02:56 +12:00
bootstrap Split backend status and progress related functionality out of pgstat.c. 2021-04-03 11:42:52 -07:00
catalog Standardize pg_authid oid_symbol values. 2021-04-10 12:01:41 -07:00
commands Avoid unnecessary table open/close in TRUNCATE command. 2021-04-12 00:05:58 +09:00
executor Fixes for query_id feature 2021-04-08 11:16:01 -04:00
foreign Update copyright for 2021 2021-01-02 13:06:25 -05:00
jit Speedup ScalarArrayOpExpr evaluation 2021-04-08 23:51:22 +12:00
lib Update copyright for 2021 2021-01-02 13:06:25 -05:00
libpq Refactor hba_authname 2021-04-07 14:24:47 +02:00
main Update copyright for 2021 2021-01-02 13:06:25 -05:00
nodes Improve slightly misleading comments in nodeFuncs.c 2021-04-10 19:19:45 +12:00
optimizer Speedup ScalarArrayOpExpr evaluation 2021-04-08 23:51:22 +12:00
parser Fix old bug with coercing the result of a COLLATE expression. 2021-04-12 14:37:49 -04:00
partitioning Speedup ScalarArrayOpExpr evaluation 2021-04-08 23:51:22 +12:00
po Translation updates 2020-05-18 12:49:30 +02:00
port Use errmsg_internal for debug messages 2021-02-17 11:33:25 +01:00
postmaster Set pg_class.reltuples for partitioned tables 2021-04-09 11:50:33 -04:00
regex Further tweak memory management for regex DFAs. 2021-03-08 16:32:29 -05:00
replication Allow TRUNCATE command to truncate foreign tables. 2021-04-08 20:56:08 +09:00
rewrite Clean up treatment of missing default and CHECK-constraint records. 2021-04-06 10:34:39 -04:00
snowball Update snowball 2021-02-19 08:10:15 +01:00
statistics Fix uninitialized variable from commit a4d75c86b. 2021-04-11 11:46:46 -04:00
storage Optionally prefetch referenced data in recovery. 2021-04-08 23:20:42 +12:00
tcop SQL-standard function body 2021-04-07 21:47:55 +02:00
tsearch Don't leak compiled regex(es) when an ispell cache entry is dropped. 2021-03-18 22:22:47 -04:00
utils Move log_autovacuum_min_duration into its correct sections 2021-04-12 13:53:17 +09:00
.gitignore
common.mk
Makefile Use sort_template.h for qsort_tuple() and qsort_ssup(). 2021-03-03 17:02:32 +13:00
nls.mk Add missing gettext triggers 2020-04-28 13:35:40 +02:00