pgsql: Improve error message on snapshot import in snapmgr.c - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Improve error message on snapshot import in snapmgr.c
Date
Msg-id E1qgbCR-003htC-S7@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a4cef3384d6de4d60989303e56883a9ff2239608

Modified Files
--------------
src/backend/utils/time/snapmgr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Refactor error messages for unsupported providers in pg_locale.c
Next
From: Andres Freund
Date:
Subject: pgsql: Fix tracking of temp table relation extensions as writes