pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi
Date: Wed, 19 Sep 2018 11:55:01 -0400
Message-ID: <26882.1537372501@sss.pgh.pa.us> (raw)
In-Reply-To: <20180919023211.GC1650@paquier.xyz>
References: <19655.1537195712@sss.pgh.pa.us>
	<f62917d5-cc77-c6ac-847f-44f922ccdd97@2ndQuadrant.com>
	<3883.1537200836@sss.pgh.pa.us>
	<11148.1537227504@sss.pgh.pa.us>
	<20180918001143.GG31460@paquier.xyz>
	<20180918024227.GI31460@paquier.xyz>
	<23296.1537281909@sss.pgh.pa.us>
	<71bf47219037a5e3839748eb55e4fa175b58f523.camel@cybertec.at>
	<25361.1537285137@sss.pgh.pa.us>
	<c68010480459c79f24a015096ae43b6f0bcd9854.camel@cybertec.at>
	<20180919023211.GC1650@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> I have spent a large portion of my morning trying to test all the
> solutions proposed, and a winner shows up.  ...

> - win32-open-laurenz.patch, which enforces to text mode only if binary
> mode is not defined, which maps strictly to what pre-11 is doing when
> calling the system _open or _fopen.  And surprisingly, this is proving
> to pass all the tests I ran: bincheck (including pgbench and pg_dump),
> upgradecheck, recoverycheck, check, etc.  initdb --pwfile is not
> complaining to me either.

I'm OK with this approach.  I wonder though what happens if you take
away the "#ifdef FRONTEND" and just enforce that one or the other mode
is selected always.  That would seem like a sensible solution rather
than a wart to me ...

			regards, tom lane




view thread (24+ messages)  latest in thread

Message-ID: <26882.1537372501@sss.pgh.pa.us>
Permalink:  ../26882.1537372501@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26882.1537372501@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, laurenz.albe@cybertec.at, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi
  In-Reply-To: <26882.1537372501@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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