pgsql: Fix unportable setvbuf() usage in initdb.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix unportable setvbuf() usage in initdb.
Date: 2014-05-15 19:58:36
Message-ID: E1Wl1nY-0002Ud-HP@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix unportable setvbuf() usage in initdb.

In yesterday's commit 2dc4f011fd61501cce507be78c39a2677690d44b, I tried
to force buffering of stdout/stderr in initdb to be what it is by
default when the program is run interactively on Unix (since that's how
most manual testing is done). This tripped over the fact that Windows
doesn't support _IOLBF mode. We dealt with that a long time ago in
syslogger.c by falling back to unbuffered mode on Windows. Export that
solution in port.h and use it in initdb.

Back-patch to 8.4, like the previous commit.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1dd0b3eeccaffd33b9c970a91c53fe42692ce8c2

Modified Files
--------------
src/backend/postmaster/syslogger.c | 23 ++++++-----------------
src/bin/initdb/initdb.c | 2 +-
src/include/port.h | 14 ++++++++++++++
3 files changed, 21 insertions(+), 18 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-05-16 07:13:58 pgsql: Initialize tsId and dbId fields in WAL record of COMMIT PREPARED
Previous Message Peter Eisentraut 2014-05-15 17:24:00 pgsql: Fix whitespace