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

Commitce86d27

Browse files
author
Maxim Orlov
committed
Issue#27: Improve compatibility check.
Use pg_compatibility_check_no_error function to precheck compatibility in order to free memory.
1 parent6d7aa7a commitce86d27

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

‎pg_variables.c‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2484,21 +2484,12 @@ compatibility_check(void)
24842484
*/
24852485
#ifdefPGPRO_EE
24862486

2487-
/* All the ee have ATX. */
2488-
#defineATX_CHECK(getNestLevelATX() != 0)
2489-
/* ee10 and less does not have connpool. */
2490-
#if (PG_VERSION_NUM >=110000)
2491-
#defineCONNPOOL_CHECK(!IsDedicatedBackend)
2492-
#else
2493-
#defineCONNPOOL_CHECK(false)
2494-
#endif
2495-
24962487
#if (PG_VERSION_NUM<100000)
24972488
/*
24982489
* This versions does not have dedicated macro to check compatibility.
24992490
* So, use simple check here for ATX.
25002491
*/
2501-
if (ATX_CHECK)
2492+
if (getNestLevelATX()!=0)
25022493
{
25032494
freeStatsLists();
25042495
elog(ERROR,"pg_variables extension is not compatible with "
@@ -2513,7 +2504,7 @@ compatibility_check(void)
25132504
*/
25142505
#ifdefPG_COMPATIBILITY_CHECK
25152506
{
2516-
if (ATX_CHECK||CONNPOOL_CHECK)
2507+
if (!pg_compatibility_check_no_error())
25172508
freeStatsLists();
25182509

25192510
PG_COMPATIBILITY_CHECK("pg_variables");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp