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

Appearance settings

Commit be02290

Browse filesBrowse files
committed
Revert "Improve error message on snapshot import in snapmgr.c"
This reverts commit a0d87bc, following a remark from Andres Frend that the new error can be triggered with an incorrect SET TRANSACTION SNAPSHOT command without being really helpful for the user as it uses the internal file name. Discussion: https://postgr.es/m/20230914020724.hlks7vunitvtbbz4@awork3.anarazel.de Backpatch-through: 11
1 parent e0b2eed commit be02290
Copy full SHA for be02290

File tree

Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/backend/utils/time/snapmgr.c
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,9 +1391,8 @@ ImportSnapshot(const char *idstr)
13911391
f = AllocateFile(path, PG_BINARY_R);
13921392
if (!f)
13931393
ereport(ERROR,
1394-
(errcode_for_file_access(),
1395-
errmsg("could not open file \"%s\" for reading: %m",
1396-
path)));
1394+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1395+
errmsg("invalid snapshot identifier: \"%s\"", idstr)));
13971396

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.