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 1upTYH-005tEw-74 for pgsql-general@arkaria.postgresql.org; Fri, 22 Aug 2025 15:19:38 +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 1upTYG-006nxf-HD for pgsql-general@arkaria.postgresql.org; Fri, 22 Aug 2025 15:19:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1upTYG-006nxW-6N for pgsql-general@lists.postgresql.org; Fri, 22 Aug 2025 15:19:36 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1upTYE-001ILC-2W for pgsql-general@lists.postgresql.org; Fri, 22 Aug 2025 15:19:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description; bh=TBBnNRMiTkBeYr9W7M+ZWv6U4tkAHMK25QJE28DrJi4=; b=U5NodWaKKdQXd25Nq36PWX60KR pIWFYrLu1VX1KWA16TRGA+GnpaprXy0Zl1Jk4ZnP3JcoVW+P+pkqOD3GSytaPI0sl1wKqAULqpXoS uNXxoURXxhfhmln01bShskjAlLzRSZSFJGq4egY5PJXcjHkZhqwmL+yvhuMzn1xhBTB8=; Received: from depesz by depesz.com with local (Exim 4.96) (envelope-from ) id 1upTYD-00D9Fe-1M; Fri, 22 Aug 2025 17:19:33 +0200 Date: Fri, 22 Aug 2025 17:19:33 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Pavel Stehule Cc: Adrian Klaver , PostgreSQL General , Chris Wilson Subject: Re: Streaming replica hangs periodically for ~ 1 second - how to diagnose/debug Message-ID: Reply-To: depesz@depesz.com References: <25334887-f1c3-40a1-94b0-753c7d67ae2b@aklaver.com> <2a3e4a8d-e8c2-46d6-ad7d-9e631ce6725e@aklaver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Aug 22, 2025 at 05:07:09PM +0200, Pavel Stehule wrote: > > Any idea on what could it be? > Few years ago I had a similar experience - some sec mystic lags - the > problem was in virtualization. While I can't discount this idea, after all it is aws ec2, so virtual boxes, what makes me wonder is: in case of this slow situation there is futex call, which takes a second. But there are no futex calls in any other query processing logs. So, while it is obvious that futex "wasted" this time, the question is: why would pg run futex() for this one query at all? Best regards, depesz