Refactoring for CommitTransactionCommand()/AbortCurrentTransaction()
authorAlexander Korotkov <akorotkov@postgresql.org>
Wed, 17 Apr 2024 21:29:41 +0000 (00:29 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Wed, 17 Apr 2024 21:29:53 +0000 (00:29 +0300)
commit40126ac68f2ff96351cd6071350eb2d5cbd50145
treea99f14ee6065221c2c4de158833a1da3fb582b0c
parent3ab8cf92754d5ee4390af4e4840fb45d5bc25007
Refactoring for CommitTransactionCommand()/AbortCurrentTransaction()

fefd9a3fed turned tail recursion of CommitTransactionCommand() and
AbortCurrentTransaction() into iteration.  However, it splits the handling of
cases between different functions.

This commit puts the handling of all the cases into
AbortCurrentTransactionInternal() and CommitTransactionCommandInternal().
Now CommitTransactionCommand() and AbortCurrentTransaction() are just doing
the repeated calls of internal functions.

Reported-by: Andres Freund
Discussion: https://postgr.es/m/20240415224834.w6piwtefskoh32mv%40awork3.anarazel.de
Author: Andres Freund
src/backend/access/transam/xact.c