Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YLtHk-0006d9-Mz for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Feb 2015 12:54:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YLtHk-0000JN-6S for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Feb 2015 12:54:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YLtHj-0000JG-2W for pgsql-bugs@postgresql.org; Thu, 12 Feb 2015 12:54:23 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YLtHb-0007ia-Am for pgsql-bugs@postgresql.org; Thu, 12 Feb 2015 12:54:20 +0000 Received: from intern.anarazel.de (unknown [80.79.194.4]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 1E5D2460002; Thu, 12 Feb 2015 13:54:13 +0100 (CET) Date: Thu, 12 Feb 2015 13:54:12 +0100 From: Andres Freund To: Michael Paquier Cc: Asif Naeem , "pgsql-bugs@postgresql.org" Subject: Re: gettimeofday cause crash on Windows Message-ID: <20150212125412.GA9449@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -4.2 (----) 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 On 2015-02-12 04:48:00 -0800, Michael Paquier wrote: > I didn't follow much the thread implementing this feature, but this > commit has somewhat not taken into account the fact that the contents > of src/port could as well be used for the frontends, per se the > comments on top of init_win32_gettimeofday mentioning only the backend > startup, something not wrong in itself, but not completely right > either. So what we have now is an unpleasant crash trigger for any > client applications on Windows < 2k12 linking to libpqport that call > gettimeofday(). I would not be surprised that we would get bug reports > of the type "why my client binary crashes suddendly with 9.5" if we > keep the code as-is. > So ISTM that your patch does the correct thing by setting > pg_get_system_time to &GetSystemTimeAsFileTime to not break any > existing applications, and that we should as well update any in-core > binary tools to switch to the precise API I think I'd rather have it crash so people are forced to adjust the client applications. The number of things linking to pgport should be rather low. Greetings, Andres Freund -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs