| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | 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-14 00:06:25 |
| Message-ID: | 20200714000625.GB32422@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Tue, Jul 7, 2020 at 05:25:49PM +0900, Michael Paquier wrote:
> So, I have been looking at that again. And, I am not completely sure
> why the combination of FILE_FLAG_NO_BUFFERING and _setmode(O_TEXT)
> would cause this failure, but I suspect that this is caused by the
> fact that CRLF gets changed into single LF characters on input (input
> buffer uses random data), causing the size of what's expected to be
> written to not match with what is actually written. An additional
> factor is visibly our wrapper safe-concurrent wrapper pgwin32_open().
>
> It seems to me that it would be a better idea to just use the binary
> mode for all the open() calls in pg_test_fsync in the long run, which
> is what the attached patch does as there is no control on the data
> written. This way, we avoid any translation that may happen during
> the write. Any thoughts?
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.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2020-07-14 00:40:38 | Re: Small query using LATERAL that segfaults Postgres |
| Previous Message | Murali Natti | 2020-07-13 22:44:41 | Re: BUG #16427: pgsql_tmp - temp files not released |