Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YLxn5-0003fo-O4 for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Feb 2015 17:43:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YLxn4-0007Ab-5Y for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Feb 2015 17:43:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YLxn3-0007AU-4t for pgsql-bugs@postgresql.org; Thu, 12 Feb 2015 17:43:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YLxmz-0006eF-M2 for pgsql-bugs@postgresql.org; Thu, 12 Feb 2015 17:43:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t1CHgjI9018266; Thu, 12 Feb 2015 12:42:45 -0500 From: Tom Lane To: Alvaro Herrera cc: Asif Naeem , Andres Freund , Michael Paquier , "pgsql-bugs@postgresql.org" Subject: Re: gettimeofday cause crash on Windows In-reply-to: <20150212151403.GJ3391@alvh.no-ip.org> References: <20150212125412.GA9449@alap3.anarazel.de> <20150212131316.GB9449@alap3.anarazel.de> <20150212151403.GJ3391@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Thu, 12 Feb 2015 12:14:03 -0300" Date: Thu, 12 Feb 2015 12:42:44 -0500 Message-ID: <18265.1423762964@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Alvaro Herrera writes: > I wonder if it would work to set the function initially to the > initialization function, so that on the first call the Precise version, > if it exists, is detected (or the stock version otherwise) and set as > the function to call for later -- without requiring a jump in every > subsequent execution of gettimeofday(), of course. The initialization > function itself would have to return the value returned by > GetSystemTimePreciseAsFileTime, of course. +1. The idea that we are going to alter the calling requirements around a POSIX-standard function is utterly horrible. It will break third-party code, very probably. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs