pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Handle ReadFile() EOF correctly on Windows. 2+ messages / 1 participants [nested] [flat]
* pgsql: Handle ReadFile() EOF correctly on Windows. @ 2019-11-20 05:32 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Thomas Munro @ 2019-11-20 05:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Handle ReadFile() EOF correctly on Windows. When ReadFile() encounters the end of a file while reading from a synchronous handle with an offset provided via OVERLAPPED, it reports an error instead of returning 0. By not handling that (undocumented) result correctly, we caused some noisy LOG messages about an unknown error code. Repair. Back-patch to 12, where we started using pread()/ReadFile() with an offset. Reported-by: ZhenHua Cai, Amit Kapila Diagnosed-by: Juan Jose Santamaria Flecha Tested-by: Amit Kapila Discussion: https://postgr.es/m/CAA4eK1LK3%2BWRtpz68TiRdpHwxxWm%3D%2Bt1BMf-G68hhQsAQ41PZg%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/6969deeb8d3991cc533a5bcf451ae5eecaa9a517 Modified Files -------------- src/port/pread.c | 3 +++ 1 file changed, 3 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Handle ReadFile() EOF correctly on Windows. @ 2019-11-20 05:32 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Thomas Munro @ 2019-11-20 05:32 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Handle ReadFile() EOF correctly on Windows. When ReadFile() encounters the end of a file while reading from a synchronous handle with an offset provided via OVERLAPPED, it reports an error instead of returning 0. By not handling that (undocumented) result correctly, we caused some noisy LOG messages about an unknown error code. Repair. Back-patch to 12, where we started using pread()/ReadFile() with an offset. Reported-by: ZhenHua Cai, Amit Kapila Diagnosed-by: Juan Jose Santamaria Flecha Tested-by: Amit Kapila Discussion: https://postgr.es/m/CAA4eK1LK3%2BWRtpz68TiRdpHwxxWm%3D%2Bt1BMf-G68hhQsAQ41PZg%40mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2189f49c420f2bf49dfac122f9fbae51c3565594 Modified Files -------------- src/port/pread.c | 3 +++ 1 file changed, 3 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-11-20 05:32 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-11-20 05:32 pgsql: Handle ReadFile() EOF correctly on Windows. Thomas Munro <tmunro@postgresql.org> 2019-11-20 05:32 pgsql: Handle ReadFile() EOF correctly on Windows. Thomas Munro <tmunro@postgresql.org>
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