aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-09-14 16:00:43 +0900
committerMichael Paquier <michael@paquier.xyz>2023-09-14 16:00:43 +0900
commitf18efc6f2bc89093e228b587e48f0cc94a6f17fa (patch)
tree3c545a86c24f62143d5361da750db59e53da256a /src
parentd98cbea2012561e777f6fbffb9733732a0a26ce5 (diff)
downloadpostgresql-f18efc6f2bc89093e228b587e48f0cc94a6f17fa.tar.gz
postgresql-f18efc6f2bc89093e228b587e48f0cc94a6f17fa.zip
Revert "Improve error message on snapshot import in snapmgr.c"
This reverts commit a0d87bcd9b57, 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
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/time/snapmgr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index e4519b9251b..85b5d5cdb9e 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -1540,9 +1540,8 @@ ImportSnapshot(const char *idstr)
f = AllocateFile(path, PG_BINARY_R);
if (!f)
ereport(ERROR,
- (errcode_for_file_access(),
- errmsg("could not open file \"%s\" for reading: %m",
- path)));
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ errmsg("invalid snapshot identifier: \"%s\"", idstr)));
/* get the size of the file so that we know how much memory we need */
if (fstat(fileno(f), &stat_buf))