pgsql: Fix pg_verify_checksums on Windows.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix pg_verify_checksums on Windows.
Date: 2018-08-31 10:17:00
Message-ID: E1fvgU8-0000GN-QU@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

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

Modified Files
--------------
src/bin/pg_verify_checksums/pg_verify_checksums.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Etsuro Fujita 2018-08-31 11:48:39 pgsql: Disable support for partitionwise joins in problematic cases.
Previous Message Etsuro Fujita 2018-08-31 07:44:17 pgsql: Remove extra word from src/backend/optimizer/README