]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Don't advance origin during apply failure.
authorAmit Kapila <akapila@postgresql.org>
Wed, 21 Aug 2024 03:31:11 +0000 (09:01 +0530)
committerAmit Kapila <akapila@postgresql.org>
Wed, 21 Aug 2024 03:31:11 +0000 (09:01 +0530)
commitb39c5272c1d22d80a736647081b60a55a2d9d51e
tree5e85a8caa847909d166f2e6c0a66fcc28d0b0eba
parent25642b2a8b4215722a0eeb0bc3cf6907808b8e47
Don't advance origin during apply failure.

We advance origin progress during abort on successful streaming and
application of ROLLBACK in parallel streaming mode. But the origin
shouldn't be advanced during an error or unsuccessful apply due to
shutdown. Otherwise, it will result in a transaction loss as such a
transaction won't be sent again by the server.

Reported-by: Hou Zhijie
Author: Hayato Kuroda and Shveta Malik
Reviewed-by: Amit Kapila
Backpatch-through: 16
Discussion: https://postgr.es/m/TYAPR01MB5692FAC23BE40C69DA8ED4AFF5B92@TYAPR01MB5692.jpnprd01.prod.outlook.com
src/backend/replication/logical/worker.c
src/backend/utils/error/elog.c
src/include/utils/elog.h
src/test/subscription/t/021_twophase.pl