pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). 7+ messages / 1 participants [nested] [flat]
* pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). @ 2026-11-02 16:15 Nathan Bossart <nathan@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Nathan Bossart @ 2026-11-02 16:15 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). ExecForceStoreHeapTuple() clears the slot before storing the tuple, which invalidates the slot's TID, but it only sets the TID again for slots of type TTSOpsHeapTuple. Besides producing wrong query results, this can lead to data corruption if an affected tuple is locked (e.g., via SELECT ... FOR UPDATE). To fix, set the slot's TID for the other kinds of slots, too. Oversight in commit b8d71745ea. Author: Virender Singla <virender.cse@gmail.com> Co-authored-by: Greg Burd <greg@burd.me> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Nikolay Samokhvalov <nik@postgres.ai> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Tested-by: Shihao Zhong <zhong950419@gmail.com> Discussion: https://postgr.es/m/CAM6Zo8wZOLnCWRO_tuuXVX9J4N4JN6GsEnk8WJtT0%3D_0zy-1dw%40mail.gmail.com Discussion: https://postgr.es/m/0498c10f-839b-4f68-9994-c29b454e55a4%40app.fastmail.com Backpatch-through: 14 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8a8ee213df27c3de62df889e3e7002735c47110a Modified Files -------------- src/backend/executor/execTuples.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). @ 2026-11-02 16:15 Nathan Bossart <nathan@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Nathan Bossart @ 2026-11-02 16:15 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). ExecForceStoreHeapTuple() clears the slot before storing the tuple, which invalidates the slot's TID, but it only sets the TID again for slots of type TTSOpsHeapTuple. Besides producing wrong query results, this can lead to data corruption if an affected tuple is locked (e.g., via SELECT ... FOR UPDATE). To fix, set the slot's TID for the other kinds of slots, too. Oversight in commit b8d71745ea. Author: Virender Singla <virender.cse@gmail.com> Co-authored-by: Greg Burd <greg@burd.me> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Nikolay Samokhvalov <nik@postgres.ai> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Tested-by: Shihao Zhong <zhong950419@gmail.com> Discussion: https://postgr.es/m/CAM6Zo8wZOLnCWRO_tuuXVX9J4N4JN6GsEnk8WJtT0%3D_0zy-1dw%40mail.gmail.com Discussion: https://postgr.es/m/0498c10f-839b-4f68-9994-c29b454e55a4%40app.fastmail.com Backpatch-through: 14 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ea11f9464b59194d085a493e8b784203242cdf96 Modified Files -------------- src/backend/executor/execTuples.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). @ 2026-11-02 16:15 Nathan Bossart <nathan@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Nathan Bossart @ 2026-11-02 16:15 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). ExecForceStoreHeapTuple() clears the slot before storing the tuple, which invalidates the slot's TID, but it only sets the TID again for slots of type TTSOpsHeapTuple. Besides producing wrong query results, this can lead to data corruption if an affected tuple is locked (e.g., via SELECT ... FOR UPDATE). To fix, set the slot's TID for the other kinds of slots, too. Oversight in commit b8d71745ea. Author: Virender Singla <virender.cse@gmail.com> Co-authored-by: Greg Burd <greg@burd.me> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Nikolay Samokhvalov <nik@postgres.ai> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Tested-by: Shihao Zhong <zhong950419@gmail.com> Discussion: https://postgr.es/m/CAM6Zo8wZOLnCWRO_tuuXVX9J4N4JN6GsEnk8WJtT0%3D_0zy-1dw%40mail.gmail.com Discussion: https://postgr.es/m/0498c10f-839b-4f68-9994-c29b454e55a4%40app.fastmail.com Backpatch-through: 14 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/badcb62d62a676a9202b9a693c87166f55f743dc Modified Files -------------- src/backend/executor/execTuples.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). @ 2026-11-02 16:15 Nathan Bossart <nathan@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Nathan Bossart @ 2026-11-02 16:15 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). ExecForceStoreHeapTuple() clears the slot before storing the tuple, which invalidates the slot's TID, but it only sets the TID again for slots of type TTSOpsHeapTuple. Besides producing wrong query results, this can lead to data corruption if an affected tuple is locked (e.g., via SELECT ... FOR UPDATE). To fix, set the slot's TID for the other kinds of slots, too. Oversight in commit b8d71745ea. Author: Virender Singla <virender.cse@gmail.com> Co-authored-by: Greg Burd <greg@burd.me> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Nikolay Samokhvalov <nik@postgres.ai> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Tested-by: Shihao Zhong <zhong950419@gmail.com> Discussion: https://postgr.es/m/CAM6Zo8wZOLnCWRO_tuuXVX9J4N4JN6GsEnk8WJtT0%3D_0zy-1dw%40mail.gmail.com Discussion: https://postgr.es/m/0498c10f-839b-4f68-9994-c29b454e55a4%40app.fastmail.com Backpatch-through: 14 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7e594c30f49c9b5b014bc6dd9b22c5380d071d01 Modified Files -------------- src/backend/executor/execTuples.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). @ 2026-11-02 16:15 Nathan Bossart <nathan@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Nathan Bossart @ 2026-11-02 16:15 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). ExecForceStoreHeapTuple() clears the slot before storing the tuple, which invalidates the slot's TID, but it only sets the TID again for slots of type TTSOpsHeapTuple. Besides producing wrong query results, this can lead to data corruption if an affected tuple is locked (e.g., via SELECT ... FOR UPDATE). To fix, set the slot's TID for the other kinds of slots, too. Oversight in commit b8d71745ea. Author: Virender Singla <virender.cse@gmail.com> Co-authored-by: Greg Burd <greg@burd.me> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Nikolay Samokhvalov <nik@postgres.ai> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Tested-by: Shihao Zhong <zhong950419@gmail.com> Discussion: https://postgr.es/m/CAM6Zo8wZOLnCWRO_tuuXVX9J4N4JN6GsEnk8WJtT0%3D_0zy-1dw%40mail.gmail.com Discussion: https://postgr.es/m/0498c10f-839b-4f68-9994-c29b454e55a4%40app.fastmail.com Backpatch-through: 14 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c5c36ae6f4965a1e5cba9347c5292ebf0d7587f8 Modified Files -------------- src/backend/executor/execTuples.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). @ 2026-11-02 16:15 Nathan Bossart <nathan@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Nathan Bossart @ 2026-11-02 16:15 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). ExecForceStoreHeapTuple() clears the slot before storing the tuple, which invalidates the slot's TID, but it only sets the TID again for slots of type TTSOpsHeapTuple. Besides producing wrong query results, this can lead to data corruption if an affected tuple is locked (e.g., via SELECT ... FOR UPDATE). To fix, set the slot's TID for the other kinds of slots, too. Oversight in commit b8d71745ea. Author: Virender Singla <virender.cse@gmail.com> Co-authored-by: Greg Burd <greg@burd.me> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Nikolay Samokhvalov <nik@postgres.ai> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Tested-by: Shihao Zhong <zhong950419@gmail.com> Discussion: https://postgr.es/m/CAM6Zo8wZOLnCWRO_tuuXVX9J4N4JN6GsEnk8WJtT0%3D_0zy-1dw%40mail.gmail.com Discussion: https://postgr.es/m/0498c10f-839b-4f68-9994-c29b454e55a4%40app.fastmail.com Backpatch-through: 14 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a3d1ac49561b49e640767b65537110d5087d4017 Modified Files -------------- src/backend/executor/execTuples.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). @ 2026-11-02 16:15 Nathan Bossart <nathan@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Nathan Bossart @ 2026-11-02 16:15 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). ExecForceStoreHeapTuple() clears the slot before storing the tuple, which invalidates the slot's TID, but it only sets the TID again for slots of type TTSOpsHeapTuple. Besides producing wrong query results, this can lead to data corruption if an affected tuple is locked (e.g., via SELECT ... FOR UPDATE). To fix, set the slot's TID for the other kinds of slots, too. Oversight in commit b8d71745ea. Author: Virender Singla <virender.cse@gmail.com> Co-authored-by: Greg Burd <greg@burd.me> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Nikolay Samokhvalov <nik@postgres.ai> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Tested-by: Shihao Zhong <zhong950419@gmail.com> Discussion: https://postgr.es/m/CAM6Zo8wZOLnCWRO_tuuXVX9J4N4JN6GsEnk8WJtT0%3D_0zy-1dw%40mail.gmail.com Discussion: https://postgr.es/m/0498c10f-839b-4f68-9994-c29b454e55a4%40app.fastmail.com Backpatch-through: 14 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4e9a5dc1f57c7b1e64601825a497b94b1f36359c Modified Files -------------- src/backend/executor/execTuples.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2026-11-02 16:15 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-02 16:15 pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). Nathan Bossart <nathan@postgresql.org> 2026-11-02 16:15 pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). Nathan Bossart <nathan@postgresql.org> 2026-11-02 16:15 pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). Nathan Bossart <nathan@postgresql.org> 2026-11-02 16:15 pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). Nathan Bossart <nathan@postgresql.org> 2026-11-02 16:15 pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). Nathan Bossart <nathan@postgresql.org> 2026-11-02 16:15 pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). Nathan Bossart <nathan@postgresql.org> 2026-11-02 16:15 pgsql: Fix missing tts_tid assignments in ExecForceStoreHeapTuple(). Nathan Bossart <nathan@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox