]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Improve error message on snapshot import in snapmgr.c
authorMichael Paquier <michael@paquier.xyz>
Thu, 14 Sep 2023 01:30:23 +0000 (10:30 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 14 Sep 2023 01:30:23 +0000 (10:30 +0900)
commitbe3dfd3dff03b56ad283f14640440972c60c0588
tree03e5475a655fb672ddae7491581f5244d4497218
parent800d5bcb982b096a71438f36b8b22a3b5b557aa9
Improve error message on snapshot import in snapmgr.c

When a snapshot file fails to be read in ImportSnapshot(), it would
issue an ERROR as "invalid snapshot identifier" when opening a stream
for it in read-only mode.  This error message is reworded to be the same
as all the other messages used in this case on failure, which is useful
when debugging this area.

Thinko introduced by bb446b689b66 where snapshot imports have been
added.  A backpatch down to 11 is done as this can improve any work
related to snapshot imports in older branches.

Author: Bharath Rupireddy
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/CALj2ACWmr=3KdxDkm8h7Zn1XxBoF6hdzq8WQyMn2y1OL5RYFrg@mail.gmail.com
Backpatch-through: 11
src/backend/utils/time/snapmgr.c