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

Commitbaa2e44

Browse files
committed
check for max_prepared_xacts == 0 before locking GXact
1 parent52677a6 commitbaa2e44

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,14 @@ LockGXact(const char *gid, Oid user)
631631
before_shmem_exit(AtProcExit_Twophase,0);
632632
twophaseExitRegistered= true;
633633
}
634+
635+
/* here we know in advance that there are no prepared transactions */
636+
if (max_prepared_xacts==0)
637+
ereport(ERROR,
638+
(errcode(ERRCODE_UNDEFINED_OBJECT),
639+
errmsg("prepared transaction with identifier \"%s\" does not exist",
640+
gid)));
641+
634642
MyLockedGxact=NULL;
635643
i=string_hash(gid,0) %max_prepared_xacts;
636644
Retry:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp