Content-Length: 257795 | pFad | http://github.com/postgrespro/postgres/commit/27449ccc4d3a6ee77cbd13bed65f8fbea49486c1

FF Fix the error message when failing to restore the snapshot. · postgrespro/postgres@27449cc · GitHub
Skip to content

Commit 27449cc

Browse files
author
Amit Kapila
committed
Fix the error message when failing to restore the snapshot.
The SnapBuildRestoreContents() used a const value in the error message to indicate the size in bytes it was expecting to read from the serialized snapshot file. Fix it by reporting the size that was actually passed. Author: Hou Zhijie Reviewed-by: Amit Kapila Backpatch-through: 16 Discussion: http://postgr.es/m/OS0PR01MB5716D408364F7DF32221C08D941FA@OS0PR01MB5716.jpnprd01.prod.outlook.com
1 parent 9efcf44 commit 27449cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/replication/logical/snapbuild.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2039,7 +2039,7 @@ SnapBuildRestoreContents(int fd, char *dest, Size size, const char *path)
20392039
ereport(ERROR,
20402040
(errcode(ERRCODE_DATA_CORRUPTED),
20412041
errmsg("could not read file \"%s\": read %d of %zu",
2042-
path, readBytes, sizeof(SnapBuild))));
2042+
path, readBytes, size)));
20432043
}
20442044
}
20452045

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/27449ccc4d3a6ee77cbd13bed65f8fbea49486c1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy