Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Egon Kocjan <ekocjan(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe
Date: 2016-01-08 03:08:40
Message-ID: CAB7nPqSbaFxi=4BrmMeoqAbbFz5uTAPcCKTMs4kvda_jHugzcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Jan 8, 2016 at 11:18 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
>> On Fri, Jan 8, 2016 at 12:11 AM, Alvaro Herrera
>> <alvherre(at)2ndquadrant(dot)com> wrote:
>>> Pushed. Obviously I didn't compile any of this, so let's see how the
>>> buildfarm likes it.
>
>> It didn't like it much. Thanks for the push and for the post-turbulence fixes.
>
> brolga is still unhappy:
>
> gcc-4 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -I../../../src/interfaces/libpq -I../../../src/include -I/usr/include/libxml2 -c -o pg_ctl.o pg_ctl.c
> pg_ctl.c: In function ‘write_stderr’:
> pg_ctl.c:219: warning: implicit declaration of function ‘pgwin32_is_service’
> gcc-4 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 pg_ctl.o -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -L../../../src/port -L../../../src/common -Wl,--allow-multiple-definition -Wl,--enable-auto-import -L/usr/lib -L/usr/local/lib -Wl,--as-needed -lpgcommon -lpgport -lxslt -lxml2 -lz -lreadline -lcrypt -o pg_ctl.exe
> pg_ctl.o: In function `write_stderr':
> /home/andrew/bf/root/HEAD/pgsql.build/src/bin/pg_ctl/pg_ctl.c:219: undefined reference to `_pgwin32_is_service'
> collect2: ld returned 1 exit status
> make[3]: *** [pg_ctl] Error 1
>
> Too soon to tell about the other Windows critters.

Hm. It is not that straight-forward... and I have to admit that I will
have little time to look into that until Monday/Tuesday with a real
working environment. Now, looking at those logs, none of the win32*.c
files actually are included in the OBJS list in src/port/Makefile, so
it would seem that the correct way of going is to have the definition
of those new routines in include/port.h for all cases, and include
win32security.c in the list of objects compiled. But those are only
assumptions as I would need a cygwin environment to check that
properly at this stage.

Now, backbranches are proving that compiling pg_ctl.c with those
routines copied in it actually works fine, so based on my limited time
for the next couple of days, it may be better to just revert the patch
entirely on HEAD and apply what has been pushed into back branches to
stabilize the buildfarm, this will address the bug entirely. And it is
no good to keep the buildfarm red for long,
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-01-08 06:02:04 Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe
Previous Message Tom Lane 2016-01-08 02:18:42 Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe