pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix pg_verify_checksums on Windows.
Date: Fri, 31 Aug 2018 10:17:00 +0000
Message-ID: <E1fvgU8-0000GO-Qd@gemulon.postgresql.org> (raw)

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
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/762a16572bb5d9be6c9c53c9ecd29288da213d02

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



view thread (2+ messages)  latest in thread

Message-ID: <E1fvgU8-0000GO-Qd@gemulon.postgresql.org>
Permalink:  ../E1fvgU8-0000GO-Qd@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fvgU8-0000GO-Qd@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org
  Subject: Re: pgsql: Fix pg_verify_checksums on Windows.
  In-Reply-To: <E1fvgU8-0000GO-Qd@gemulon.postgresql.org>
  References: <E1fvgU8-0000GO-Qd@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox