Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi

Andrew Dunstan <andrew.dunstan@2ndquadrant.com>

From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, Michael Paquier <michael@paquier.xyz>
Cc: pgsql-committers@lists.postgresql.org
Date: 2018-09-17T15:13:28Z
Lists: pgsql-hackers

On 09/17/2018 10:48 AM, Tom Lane wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>> On Mon, Sep 17, 2018 at 09:41:37AM -0400, Tom Lane wrote:
>>> Looking at the set of commits between the prior run and that one,
>>> it's hard to see anything that could have triggered the test failures
>>> other than this patch --- but I also don't see how this patch would've
>>> blown up pgbench without breaking earlier tests.  Ideas?
>> Thanks, I have been looking at the build farm but I missed this one.
>> dory, which uses VS 2015 is not complaining because it does not run
>> bincheck.  At quick glance, it seems to be caused by process_file() in
>> pgbench.c which would need to open files in text mode, and the input
>> file parsing fails at the first '\' character found.
> Oh, you're thinking pgbench isn't robust against finding \r's visible
> in its input?  Could be.
>
>> I'll test that stuff on tomorrow morning manually.
> We've got a bit of a timing problem because we want to wrap 11beta4/rc1
> (still TBD) in a few hours.  I'll take a look and see if I can push a
> quick fix before that.


When you do I'll start a bowerbird run to check it.

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. Enforce translation mode for Windows frontends to text with open/fopen

  2. Fix pgbench lexer's "continuation" rule to cope with Windows newlines.

  3. Allow concurrent-safe open() and fopen() in frontend code for Windows