Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit74eaf66

Browse files
committed
Call WaitLSNCleanup() in AbortTransaction()
Even though waiting for replay LSN happens without explicit transaction,AbortTransaction() is responsible for the cleanup of the shared memory ifthe error is thrown in a stored procedure. So, we need to do WaitLSNCleanup()there to clean up after some unexpected error happened while waiting forreplay LSN.Discussion:https://postgr.es/m/202404051815.eri4u5q6oj26%40alvherre.pgsqlAuthor: Alvaro Herrera
1 parentee79928 commit74eaf66

File tree

1 file changed

+6
-0
lines changed
  • src/backend/access/transam

1 file changed

+6
-0
lines changed

‎src/backend/access/transam/xact.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include"commands/async.h"
3939
#include"commands/tablecmds.h"
4040
#include"commands/trigger.h"
41+
#include"commands/waitlsn.h"
4142
#include"common/pg_prng.h"
4243
#include"executor/spi.h"
4344
#include"libpq/be-fsstubs.h"
@@ -2771,6 +2772,11 @@ AbortTransaction(void)
27712772
*/
27722773
LWLockReleaseAll();
27732774

2775+
/*
2776+
* Cleanup waiting for LSN if any.
2777+
*/
2778+
WaitLSNCleanup();
2779+
27742780
/* Clear wait information and command progress indicator */
27752781
pgstat_report_wait_end();
27762782
pgstat_progress_end_command();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp