Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vEUbe-00CL0C-6y for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Oct 2025 15:30:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vEUbd-009BFF-6E for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Oct 2025 15:30:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vEUbc-009BF7-OK for pgsql-hackers@lists.postgresql.org; Thu, 30 Oct 2025 15:30:27 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vEUbZ-004aM2-1P for pgsql-hackers@lists.postgresql.org; Thu, 30 Oct 2025 15:30:26 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3f0ae439bc3so736668f8f.1 for ; Thu, 30 Oct 2025 08:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761838224; x=1762443024; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:subject:cc:to:from:date :sender:message-id:from:to:cc:subject:date:message-id:reply-to; bh=9Thovt6BsuVZU68zoif6hWoZqMKctll0wDJKFCa/3Xw=; b=QFv2Qx1/LsW+7aZOg4uJTA90YNRkYTdP1rHyMV556UWH+9Lj8vgSTLzB4ZaG6AxhFk JrAJj0fn45AQsllPwUP5DxNCF4mwFrAYm+kiwaNKYn91PeC8EqIRBE6L2IQr8ag9ujvA lW6DHrGVMzvys1h9qVRYL4yMpz60dDbRcAs8NCFwRauvp03vlWCuM8HCXP8tYOjyqQsf kauSBsbgF44R7cfRcNYpqZjnDvYj1JxRljPRoTAP6KNBAwuIQipz7ybJNcWGWXVlom6t OJ8g8HcMj8X0cuGWv+S4BgJ1SdLOHjMTo1wb833mSn7YJcQVuRWOU43MjomaLkWja+0e r1TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761838224; x=1762443024; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:subject:cc:to:from:date :sender:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9Thovt6BsuVZU68zoif6hWoZqMKctll0wDJKFCa/3Xw=; b=tFHsXmPidaJ0tJieM0MDc7xdgQY05ngFwjjW5e0haelIYNeXf0gDuiko9s3RdAuqmf thhGnuNQSaoKxNUNyNvimtlEHY+56fqqEVLZJTebO0J7++kt0sNhs7aQSvxEX23g/pTY bJSSiJHS9QaXToD1tR5BVSlhRi4mi0Xr9CT7a9YpIQcy+3aIYQhhm2JorjIwSg24pSqK 9nVbjA//yrvqFAcxRV2+5BDdY4rWaABS2SfJEJ7642BQXiznIWURLWeA3sw1uOBGix47 eG2TzgfKETNw1PLTZx1kUXtXTyg8XFRaot+rwgSB1sgQ0HY9KtkTk7zjZj3aLnCW3NGW Nvmg== X-Forwarded-Encrypted: i=1; AJvYcCU8D3sbTCKhZE4Bt5VXvLY5+XuWWgGhZXZQt/qvWVzZ6cbithhxKQ36s9Wpn5Q6IREyHxeKebAdjapyKurc@lists.postgresql.org X-Gm-Message-State: AOJu0YwJjxeLKBZAQP1D0AuTlU7oM+jHaToY7b0mrzCj2VuWebL/8/v6 XPV/ewF/SI1mCpvT1GL+PjObVYmzvLtNlInI+JVSHhzV99r79niS3Rav X-Gm-Gg: ASbGncvAsh0WfJZSjvrdZ/wUhDHe3Ymskf9oN29zYGg4uiawMLSFxWsPi1zMtZhqhU0 UQXBGbDLE31j8pBqIAFD5cGeQMpLapLKLUaabNA/PiB84R3CqLPGy1qWgjLqPiIjIWwFjgRHI7u CSPEYpn5iv0JQBoDk4KGar6OO5UPX5X7xQxWCwfiEoEnuFM3NUJ2ZrCgF2t8UaV7B0sJw1ncWlr 8NTt2Vk04QyGdnm54GXjErqLfcb7ci+wtiTO3FdkicpZ3zrlP+6hyPOOgzkkYuSDt2XEd6+Ql9V Smc2hXBGr6ilcV9KzJWJFZ0aH9f4WOKj1AvkP1+zesEmXnoex1yX/ftoYzfMIm6apECOr9OksDV 3BS1Z+osKydXKy3qiTZF+0Q19Q8XpjLJdUaFSds57i+4PNkfOEnePPmKjYKLa/cpfPvUWR0wqzl vLPPABQtWP0IyD1Nd9SevCk4ZtzpzhWDng6Q== X-Google-Smtp-Source: AGHT+IF1AZOkHg/FyVsHooJDbMBqkdiT0riJHmydVe7dWwAmEOuWNm/GUHTFDNnUfqq40e4CXhrN1A== X-Received: by 2002:a5d:5f84:0:b0:428:5674:7a13 with SMTP id ffacd0b85a97d-429aefbbd87mr6990185f8f.36.1761838223526; Thu, 30 Oct 2025 08:30:23 -0700 (PDT) Received: from lightning.caipicrew.dd-dns.de ([2001:a61:a93:8501:7472:66ff:286f:7468]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952db99asm32962516f8f.32.2025.10.30.08.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Oct 2025 08:30:22 -0700 (PDT) Message-ID: <6903848e.5d0a0220.13f62d.b8b9@mx.google.com> X-Google-Original-Message-ID: <20251030153021.GT10642@caipicrew.dd-dns.de;lightning.caipicrew.dd-dns.de> Sender: Michael Banck Received: from mbanck by lightning.caipicrew.dd-dns.de with local (Exim 4.92) (envelope-from ) id 1vEUbW-0004MX-4G; Thu, 30 Oct 2025 16:30:22 +0100 Date: Thu, 30 Oct 2025 16:30:22 +0100 From: Michael Banck To: Alexander Lakhin Cc: Tom Lane , Michael Paquier , pgsql-hackers@lists.postgresql.org, Thomas Munro Subject: Re: GNU/Hurd portability patches References: <283c3d69-ef32-4391-9ea3-68e47c9dea31@gmail.com> <68d3a0a0.050a0220.167290.bcf3@mx.google.com> <68d3cbe8.5d0a0220.65f10.da5f@mx.google.com> <3314741.1758724126@sss.pgh.pa.us> <68d413a3.a70a0220.24c74c.8be9@mx.google.com> <68d460fe.170a0220.3c484.0a59@mx.google.com> <4557939c-01e1-47b6-8b79-bdfc74882275@gmail.com> <9e9bacfa-37c6-48e9-9a25-741c79a1d5e5@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="eRtJSFbw+EEWtPj3" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9e9bacfa-37c6-48e9-9a25-741c79a1d5e5@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --eRtJSFbw+EEWtPj3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi, On Tue, Oct 28, 2025 at 07:00:01AM +0200, Alexander Lakhin wrote: > One month later, fruitcrow has generated this failure too: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fruitcrow&dt=2025-10-25%2007%3A45%3A03 Thanks for noticing that, I was distracted with pgconf.eu last week... It hit again today on v17: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fruitcrow&dt=2025-10-30%2011%3A04%3A28 > pgsql.build/contrib/pg_stat_statements/regression.diffs > diff -U3 /home/demo/client-code-REL_19_1/buildroot/HEAD/pgsql.build/contrib/pg_stat_statements/expected/entry_timestamp.out /home/demo/client-code-REL_19_1/buildroot/HEAD/pgsql.build/contrib/pg_stat_statements/results/entry_timestamp.out > --- /home/demo/client-code-REL_19_1/buildroot/HEAD/pgsql.build/contrib/pg_stat_statements/expected/entry_timestamp.out > 2025-10-25 08:45:03.000000000 +0100 > +++ /home/demo/client-code-REL_19_1/buildroot/HEAD/pgsql.build/contrib/pg_stat_statements/results/entry_timestamp.out > 2025-10-25 08:57:31.000000000 +0100 > @@ -147,7 +147,7 @@ >  WHERE query LIKE '%STMTTS%'; >   total | minmax_exec_zero | minmax_ts_after_ref | stats_since_after_ref >  -------+------------------+---------------------+----------------------- > -     2 |                1 |                   2 |                     0 > +     2 |                2 |                   2 |                     0 >  (1 row) > >  -- Cleanup > > Thus, the "zero time difference" issue in general still exists. I checked this, if I just run the following excerpt of entry_timestamp.sql in a tight loop, I get a few (<10) occurrances out of 10000 iterations where min/max plan time is 0 (or rather minmax_plan_zero is non-zero): SELECT pg_stat_statements_reset(); SET pg_stat_statements.track_planning = TRUE; SELECT 1 AS "STMTTS1"; SELECT count(*) as total, count(*) FILTER ( WHERE min_plan_time + max_plan_time = 0 ) as minmax_plan_zero FROM pg_stat_statements WHERE query LIKE '%STMTTS%'; On the assumption that this isn't a general bug, but just a timing issue (planning 'SELECT 1' isn't complicated), I see two possibilities: 1. Ignore the plan times, and replace SELECT 1 with SELECT pg_sleep(1e-6), similar to e849bd551. I guess this would reduce test coverage so likely not be great? 2. Make the query a bit more complicated so that the plan time is likely to be non-negligable. I actually had to go quite a way to make it pretty failsafe, the attached made it fail less than 5 times out of 50000 iterations, not sure whether that is acceptable or still considered flaky? Any other ideas? Michael --eRtJSFbw+EEWtPj3 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Make-pg_stat_statement-s-entry_timestamp-test-less-f.patch"