Re: BUG #16526: pg_test_fsync in v12 doesn't run in Windows

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: jeff(dot)janes(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16526: pg_test_fsync in v12 doesn't run in Windows
Date: 2020-07-04 01:03:56
Message-ID: 20200704010356.GC1729@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Jul 03, 2020 at 04:01:46PM +0000, PG Bug reporting form wrote:
> Note that it abandons the run here it does not just report an error and then
> continue.
> I'm not in a position to compile on Windows, so I can't run git bisect nor
> tell if this is something specific to EDB.  But I suspect this rather has
> something to do with commit 0ba06e0bfb8cfd24ff17aca92aa72245ddd6c4d7

I think that the error actually comes from 40cfe86, where we enforce
O_TEXT in our port of open() for Windows so as the switch from WIN32's
open() to our concurrent-safe version remains compatible. O_TEXT and
FILE_FLAG_NO_BUFFERING are visibly incompatible together, and
enforcing the call of open() in pg_test_fsync to use O_BINARY
(actually PG_BINARY) when testing open_datasync() allows things to go
through. So we are one call short of _setmode(), but it is more
simple to pass down the flag when opening the fd. It may actually be
safer in the long run to add the binary flag to all the calls of
open() in pg_test_fsync. Thoughts?
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2020-07-04 16:00:00 BUG #16527: Valgrind detects an invalid read in brin_revmap_data with non-index page
Previous Message Jehan-Guillaume de Rorthais 2020-07-03 20:25:38 Re: BUG #16525: Problème de connexion serveur