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

Commitfe60434

Browse files
committed
Revert "Improve error message on snapshot import in snapmgr.c"
This reverts commita0d87bc, following a remark from Andres Frendthat the new error can be triggered with an incorrect SET TRANSACTIONSNAPSHOT command without being really helpful for the user as it usesthe internal file name.Discussion:https://postgr.es/m/20230914020724.hlks7vunitvtbbz4@awork3.anarazel.deBackpatch-through: 11
1 parent19885ab commitfe60434

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,9 +1443,8 @@ ImportSnapshot(const char *idstr)
14431443
f=AllocateFile(path,PG_BINARY_R);
14441444
if (!f)
14451445
ereport(ERROR,
1446-
(errcode_for_file_access(),
1447-
errmsg("could not open file \"%s\" for reading: %m",
1448-
path)));
1446+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1447+
errmsg("invalid snapshot identifier: \"%s\"",idstr)));
14491448

14501449
/* get the size of the file so that we know how much memory we need */
14511450
if (fstat(fileno(f),&stat_buf))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp