Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNmfU-0003Io-Sf for pgsql-hackers@arkaria.postgresql.org; Sun, 01 Jan 2017 20:23:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cNmfU-0000Z2-CT for pgsql-hackers@arkaria.postgresql.org; Sun, 01 Jan 2017 20:23:48 +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_2) (envelope-from ) id 1cNme5-0007OM-CI for pgsql-hackers@postgresql.org; Sun, 01 Jan 2017 20:22:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cNme1-0002wb-IN for pgsql-hackers@postgresql.org; Sun, 01 Jan 2017 20:22:20 +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 v01KMDLI018060; Sun, 1 Jan 2017 15:22:14 -0500 From: Tom Lane To: Fabien COELHO cc: PostgreSQL Developers Subject: Re: Fixing pgbench's logging of transaction timestamps In-reply-to: References: <8837.1483216839@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Sun, 01 Jan 2017 12:53:13 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18058.1483302133.1@sss.pgh.pa.us> Date: Sun, 01 Jan 2017 15:22:13 -0500 Message-ID: <18059.1483302133@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) 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 Fabien COELHO writes: >> 3. Forget about using the instr_time result and just have doLog() execute >> gettimeofday() to obtain the timestamp to print. This is kind of >> conceptually ugly, but realistically the added overhead is probably >> insignificant. A larger objection might be that on Windows, the result >> of gettimeofday() isn't very high precision ... but it'd still be a huge >> improvement over the non-answer you get now. > Yep. >> I'm inclined to think that #2 isn't a very good choice; it appears to >> preserve the current behavior but really doesn't. So we should either >> change the behavior as in #1 or expend an extra system call as in #3. >> Preferences? > Marginal preference for #3 for KIS? Otherwise any three options seems > better than the current status. OK, done that way. BTW, why is it that the --aggregate-interval option is unsupported on Windows? Is that an artifact of the same disease of assuming too much about how instr_time is represented? I don't see any very good reason for it other than the weird decision to store the result of INSTR_TIME_GET_DOUBLE in a "long", which seems rather broken in any case. 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