Content-Length: 257986 | pFad | http://github.com/postgrespro/postgres_cluster/commit/762a16572bb5d9be6c9c53c9ecd29288da213d02

13 Fix pg_verify_checksums on Windows. · postgrespro/postgres_cluster@762a165 · GitHub
Skip to content

Commit 762a165

Browse files
author
Amit Kapila
committed
Fix pg_verify_checksums on Windows.
To verify the checksums, we open the file in text mode which doesn't work on Windows as WIN32 treats Control-Z as EOF in files opened in text mode. This leads to "short read of block .." error in some cases. Fix it by opening the files in the binary mode. Author: Amit Kapila Reviewed-by: Magnus Hagander Backpatch-through: 11 Discussion: https://postgr.es/m/CAA4eK1+LOnzod+h85FGmyjWzXKy-XV1FYwEyP-Tky2WpD5cxwA@mail.gmail.com
1 parent 40e9813 commit 762a165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pg_verify_checksums/pg_verify_checksums.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ scan_file(char *fn, int segmentno)
8383
int f;
8484
int blockno;
8585

86-
f = open(fn, 0);
86+
f = open(fn, O_RDONLY | PG_BINARY);
8787
if (f < 0)
8888
{
8989
fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),

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_cluster/commit/762a16572bb5d9be6c9c53c9ecd29288da213d02

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy