Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m28Iq-0006f1-Dc for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Jul 2021 08:25:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m28Ip-0004jH-Bn for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Jul 2021 08:25:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m28Ip-0004if-4I for pgsql-hackers@lists.postgresql.org; Sat, 10 Jul 2021 08:25:35 +0000 Received: from sfr-1.cri.mines-paristech.fr ([77.158.180.225] helo=smtp.cri.ensmp.fr) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m28Im-00036P-S8 for pgsql-hackers@postgresql.org; Sat, 10 Jul 2021 08:25:34 +0000 Received: from pseudo (137.84.7.84.rev.sfr.net [84.7.84.137]) by smtp.cri.ensmp.fr (Postfix) with ESMTPSA id 27E54C012C; Sat, 10 Jul 2021 10:27:31 +0200 (CEST) Date: Sat, 10 Jul 2021 10:25:22 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@pseudo To: Thomas Munro cc: Michael Paquier , Andrew Dunstan , Alvaro Herrera , Gregory Smith , PostgreSQL-development , david.christensen@crunchydata.com Subject: Re: pgbench logging broken by time logic changes In-Reply-To: Message-ID: References: <202106231308.lxr26cahwxuc@alvherre.pgsql> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk >> Works for me: patch applies, global and local check ok. I'm fine with it. > > I hoped we were done here but I realised that your check for 1-3 log > lines will not survive the harsh environment of the build farm. > Adding sleep(2) before the final doLog() confirms that. I had two > ideas: > > 1. Give up and expect 1-180 lines. (180s is the current timeout > tolerance used elsewhere to deal with > swamped/valgrind/swapping/microsd computers, after a few rounds of > inflation, so if you need an arbitrary large number to avoid buildfarm > measles that's my suggestion....) > 2. Change doLog() to give up after end_time. But then I think you'd > need to make it 0-3 :-( > > I think the logging could be tightened up to work the way you expected > in future work, though. Perhaps we could change all logging to work > with transaction start time instead of log-writing time, which doLog() > should receive. If you never start a transaction after end_time, then > there can never be an aggregate that begins after that, and the whole > thing becomes more deterministic. That kind of alignment of aggregate > timing with whole-run timing could also get rid of those partial > aggregates completely. But that's an idea for 15. > > So I think we should do 1 for now. Objections or better ideas? At least, we now that it is too much. What about moving the test as is in the TODO section with a comment, next to the other one, for now? I hesitated to suggest that before for the above risks, but I was very naively optimistic that it may pass because the test is not that too demanding. Someone suggested to have a "real-time" configure switch to enable/disable time-sensitive tests. -- Fabien.