pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi
Date: Tue, 18 Sep 2018 17:28:53 +0200
Message-ID: <71bf47219037a5e3839748eb55e4fa175b58f523.camel@cybertec.at> (raw)
In-Reply-To: <23296.1537281909@sss.pgh.pa.us>
References: <23543.1536938575@sss.pgh.pa.us>
	<20180914224939.GA1178@paquier.xyz>
	<20180917114113.GA31460@paquier.xyz>
	<17194.1537191697@sss.pgh.pa.us>
	<20180917140202.GF31460@paquier.xyz>
	<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>

Tom Lane wrote:
> Well, we have to do something.  I have a report from EDB's packagers
> that in 11beta4, "initdb --pwfile" is failing on Windows (ie, one can't
> connect afterwards using the specified password).  It seems nearly
> certain to me that the reason is that the file is read with
> 
>                 FILE       *pwf = fopen(pwfilename, "r");
> 
> and so the \r isn't getting stripped from what's used as the password.

Perhaps there is something obvious that I'm missing, but it seems that
all the problems we observe are caused by frontend code suddenly defaulting
to binary mode when it was text mode before.

Would it be an option to have pgwin32_open default to text mode in
frontend code and to binary mode in backend code?

Yours,
Laurenz Albe





view thread (24+ messages)  latest in thread

Message-ID: <71bf47219037a5e3839748eb55e4fa175b58f523.camel@cybertec.at>
Permalink:  ../71bf47219037a5e3839748eb55e4fa175b58f523.camel@cybertec.at/
Also on:    postgresql.org/message-id/71bf47219037a5e3839748eb55e4fa175b58f523.camel@cybertec.at

 · 

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: laurenz.albe@cybertec.at, tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi
  In-Reply-To: <71bf47219037a5e3839748eb55e4fa175b58f523.camel@cybertec.at>

* 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