Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cLu1M-0005A7-HT for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Dec 2016 15:50:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cLu1M-0007kx-4d for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Dec 2016 15:50:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cLu1L-0007kr-IS for pgsql-hackers@postgresql.org; Tue, 27 Dec 2016 15:50:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cLu1I-0008EI-K8 for pgsql-hackers@postgresql.org; Tue, 27 Dec 2016 15:50:35 +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 uBRFoRtI013815; Tue, 27 Dec 2016 10:50:28 -0500 From: Tom Lane To: Andres Freund cc: Greg Stark , PostgreSQL-development , Haribabu Kommi Subject: Re: gettimeofday is at the end of its usefulness? In-reply-to: <20161227091737.5jlcbu4rnqpv2k77@alap3.anarazel.de> References: <31856.1400021891@sss.pgh.pa.us> <20140515185614.GG25053@momjian.us> <20237.1465397783@sss.pgh.pa.us> <15740.1482788055@sss.pgh.pa.us> <20161227091737.5jlcbu4rnqpv2k77@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 27 Dec 2016 01:17:37 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13813.1482853827.1@sss.pgh.pa.us> Date: Tue, 27 Dec 2016 10:50:27 -0500 Message-ID: <13814.1482853827@sss.pgh.pa.us> X-Pg-Spam-Score: -5.0 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > On 2016-12-27 01:35:05 +0000, Greg Stark wrote: >> On Dec 26, 2016 10:35 PM, "Tom Lane" wrote: >>> So it seems like the configure support we'd need is to detect >>> whether clock_gettime is available (note on Linux there's also >>> a library requirement, -lrt), and we would also need a way to >>> provide a platform-specific choice of clockid; we at least need >>> enough smarts to use CLOCK_MONOTONIC_RAW on macOS. >> This seems like something that really should be checked at runtime. > I'm pretty strongly against doing performance measurements at > startup. Both the delay and the potential for differing test results > seem like pretty bad consequences. Yeah, that doesn't sound great to me either. And I don't entirely see the point, at least not with what we know now. I am a bit concerned that we'll find out there are popular platforms where clock_gettime compiles but fails with ENOSYS, or some similarly unhelpful behavior. But we won't find that out if we don't try. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers