]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix fetching default toast value during decoding of in-progress transactions.
authorAmit Kapila <akapila@postgresql.org>
Mon, 7 Oct 2024 09:34:05 +0000 (15:04 +0530)
committerAmit Kapila <akapila@postgresql.org>
Mon, 7 Oct 2024 09:34:05 +0000 (15:04 +0530)
commit0f0e253dbf9ed60e037e9b90120404e385c8377b
tree4f019fe0565daf17739f6d2fb10e30631122e746
parent5de77b609cbeffcb0b9a570f3848c60bc99ca7fa
Fix fetching default toast value during decoding of in-progress transactions.

During logical decoding of in-progress transactions, we perform the toast
table scan while fetching the default toast value for an attribute. We
forgot to initialize the flag during this scan to indicate that the system
table scan is in progress. We need this flag to ensure that during logical
decoding we never directly access the tableam or heap APIs because we check
for concurrent aborts only in systable_* APIs.

Reported-by: Alexander Lakhin
Author: Takeshi Ideriha, Hou Zhijie
Reviewed-by: Amit Kapila, Hou Zhijie
Backpatch-through: 14
Discussion: https://postgr.es/m/18641-6687273b7f15269d@postgresql.org
contrib/test_decoding/expected/stream.out
contrib/test_decoding/sql/stream.sql
src/backend/access/index/genam.c