Re: BUG #16526: pg_test_fsync in v12 doesn't run in Windows
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: jeff.janes@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2020-07-14T14:27:00Z
Lists: pgsql-bugs
On Tue, Jul 14, 2020 at 12:54:58PM +0900, Michael Paquier wrote: > On Mon, Jul 13, 2020 at 08:06:25PM -0400, Bruce Momjian wrote: > > Well, pg_test_fsync is testing binary writes, so using TEXT for the > > files might add unwanted overhead, so I think binary is the best > > approach. > > Thanks. Please note that we have switched frontend tools to use our > concurrent-safe flavor of open() and fopen() as of 0ba06e0 (12 and > newer versions), but 40cfe86 has shown that we have been using the > text mode in pg_test_fsync since forever as Windows' open() uses the > text mode by default if we don't specify _fmode with _setmode(): > https://docs.microsoft.com/en-us/cpp/c-runtime-library/fmode?view=vs-2019 > > For this reason, it seems more sensible to me to not backpatch this > change only down to 12, but actually all the way down to 9.5. OK. I am kind of surprised we haven't received bug reports earlier, but I guess few Windows users run pg_test_fsync, and fewer report problems. -- Bruce Momjian <bruce@momjian.us> https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee
Commits
-
Switch pg_test_fsync to use binary mode on Windows
- ab7ce97ece57 9.5.23 landed
- a452b239e3b0 9.6.19 landed
- 800ec48f5ef2 10.14 landed
- de559c2b0642 11.9 landed
- cd113a0b4741 12.4 landed
- beebbb39d932 13.0 landed
- 932f9fb504a5 14.0 landed
-
Allow concurrent-safe open() and fopen() in frontend code for Windows
- 0ba06e0bfb8c 12.0 cited