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

Commit152cc15

Browse files
committed
PGPRO-2564: Add ATX compatibility check
1 parent97e2365 commit152cc15

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎pg_variables.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,6 +2088,15 @@ processChanges(Action action)
20882088
}
20892089
}
20902090

2091+
staticvoid
2092+
compatibility_check(void)
2093+
{
2094+
#ifdefPGPRO_EE
2095+
if (getNestLevelATX()!=0)
2096+
elog(ERROR,"pg_variable extension is not compatible with autonomous transactions and connection pooling");
2097+
#endif
2098+
}
2099+
20912100
/*
20922101
* Intercept execution during subtransaction processing
20932102
*/
@@ -2101,6 +2110,7 @@ pgvSubTransCallback(SubXactEvent event, SubTransactionId mySubid,
21012110
{
21022111
caseSUBXACT_EVENT_START_SUB:
21032112
pushChangesStack();
2113+
compatibility_check();
21042114
break;
21052115
caseSUBXACT_EVENT_COMMIT_SUB:
21062116
processChanges(RELEASE_SAVEPOINT);
@@ -2125,6 +2135,7 @@ pgvTransCallback(XactEvent event, void *arg)
21252135
switch (event)
21262136
{
21272137
caseXACT_EVENT_PRE_COMMIT:
2138+
compatibility_check();
21282139
processChanges(RELEASE_SAVEPOINT);
21292140
break;
21302141
caseXACT_EVENT_ABORT:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp