Re: pgbench on mingw needs fflush - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: pgbench on mingw needs fflush
Date
Msg-id 20070313090640.GF22636@svr2.hagander.net
Whole thread Raw
In response to Re: pgbench on mingw needs fflush  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: pgbench on mingw needs fflush
List pgsql-patches
On Tue, Mar 13, 2007 at 05:09:15PM +0900, ITAGAKI Takahiro wrote:
>
> Tatsuo Ishii <ishii@sraoss.co.jp> wrote:
>
> > Can we distinguish mingw case from others so that we could ifdef out
> > the extra fflush()?
> > > The buffered stderr might be a bug of mingw
>
> After a little research, I found that MSDN says the buffered stderr is
> a specifications on Windows somehow, not a bug.
>
> setvbuf() is better solution for the problem.
> This is more simple and no need to use ifdef.

I was just going to suggest this, because this is what we already use in
the backend (src/backend/main/main.c).

Applied, but with the #ifdefs, because that's cleaner and that's also
how we do it in the backend.

//Magnus

pgsql-patches by date:

Previous
From: Gregory Stark
Date:
Subject: Re: guc patch: Make variables fall back to default values
Next
From: Joachim Wieland
Date:
Subject: Re: guc patch: Make variables fall back to default values