1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-09 13:09:39 +03:00

File size in a backup manifest should use uint64, not size_t.

size_t is the size of an object in memory, not the size of a file on disk.

Thanks to Tom Lane for noting the error.

Discussion: http://postgr.es/m/1865585.1727803933@sss.pgh.pa.us
This commit is contained in:
Robert Haas
2024-10-02 09:59:04 -04:00
parent 7b2822ecf9
commit d94cf5ca7f
9 changed files with 28 additions and 22 deletions

View File

@@ -650,7 +650,7 @@ static void
json_manifest_finalize_file(JsonManifestParseState *parse)
{
JsonManifestParseContext *context = parse->context;
size_t size;
uint64 size;
char *ep;
int checksum_string_length;
pg_checksum_type checksum_type;
@@ -688,7 +688,7 @@ json_manifest_finalize_file(JsonManifestParseState *parse)
}
/* Parse size. */
size = strtoul(parse->size, &ep, 10);
size = strtou64(parse->size, &ep, 10);
if (*ep)
json_manifest_parse_failure(parse->context,
"file size is not an integer");