Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aHYSB-0000W4-RK for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Jan 2016 14:55:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aHYSB-0000oy-6o for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Jan 2016 14:55:47 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHYSA-0000oY-DK for pgsql-bugs@postgresql.org; Fri, 08 Jan 2016 14:55:46 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aHYS3-0000OV-6N for pgsql-bugs@postgresql.org; Fri, 08 Jan 2016 14:55:45 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.53.52]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 8F81F400EBA; Fri, 8 Jan 2016 06:55:37 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 64883580; Fri, 8 Jan 2016 11:55:35 -0300 (CLT) Date: Fri, 8 Jan 2016 11:55:35 -0300 From: Alvaro Herrera To: Andrew Dunstan Cc: Michael Paquier , Tom Lane , Egon Kocjan , PostgreSQL mailing lists Subject: Re: BUG #13594: pg_ctl.exe redirects stderr to Windows Events Log if stderr is redirected to pipe Message-ID: <20160108145535.GA580550@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <568FC4CB.6050904@dunslane.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Andrew Dunstan wrote: > On 01/08/2016 02:11 AM, Michael Paquier wrote: > >Looking at the logs, the main difference is that win32security.c is > >not compiled in -lpgport for cygwin, and cygwin goes through > >src/include/port/win32.h to refer to some routines, so I would think > >that the correct fix is to add win32security.c to the list of OBJS for > >cygwin. So the attached is correct perhaps? That's a blind fix I don't > >have cygwin set up on my machines now. > I'll test it when I get a moment. Thanks for the patch. > > I see this service code goes back probably to the first commit of pg_ctl.c, > which means it's going to have been either my fault or Bruce's :-) Per IM conversation with Andrew, I pushed it blind and he'll set up an immediate BF run on brolga so we know quickly whether it worked. > TBH I'm not sure how to run postgres as a service on Cygwin. In > general I would expect it to be via cygrunsrv, like other services I > do actually run (cron and cygserver), rather than via pg_ctl. Anyway, > for now lets see if we can get it building again. Yeah, I guess you'd normally you'd do that, but the point is that the OP was using pg_ctl to control one that's *not* a service and the logs were still sent to Event Log because of the bug fixed here. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs