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

Commit27d3496

Browse files
committed
Check that global_snapshot_defer_time early instead of falling on assert.
Also set default value to 30 secs.
1 parent19d715c commit27d3496

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

‎src/backend/utils/misc/guc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2349,7 +2349,7 @@ static struct config_int ConfigureNamesInt[] =
23492349
NULL
23502350
},
23512351
&global_snapshot_defer_time,
2352-
0,0,INT_MAX,
2352+
30,0,INT_MAX,
23532353
NULL,NULL,NULL
23542354
},
23552355

‎src/backend/utils/time/snapmgr.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,6 +2255,13 @@ ImportGlobalSnapshot(GlobalCSN snap_global_csn)
22552255
errhint("Make sure the configuration parameter \"%s\" is enabled.",
22562256
"track_global_snapshots")));
22572257

2258+
if (global_snapshot_defer_time <=0)
2259+
ereport(ERROR,
2260+
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
2261+
errmsg("could not import global snapshot"),
2262+
errhint("Make sure the configuration parameter \"%s\" is positive.",
2263+
"global_snapshot_defer_time")));
2264+
22582265
/*
22592266
* Call GlobalSnapshotToXmin under ProcArrayLock to avoid situation that
22602267
* resulting xmin will be evicted from map before we will set it into our
@@ -2288,5 +2295,3 @@ pg_global_snaphot_import(PG_FUNCTION_ARGS)
22882295
ImportGlobalSnapshot(global_csn);
22892296
PG_RETURN_VOID();
22902297
}
2291-
2292-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp