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 1uszL7-00E593-2c for pgsql-admin@arkaria.postgresql.org; Mon, 01 Sep 2025 07:52:34 +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 1uszL4-0053Uq-Ll for pgsql-admin@arkaria.postgresql.org; Mon, 01 Sep 2025 07:52:31 +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 1uszL4-0053Uh-8n for pgsql-admin@lists.postgresql.org; Mon, 01 Sep 2025 07:52:30 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uszL1-002nrZ-2w for pgsql-admin@lists.postgresql.org; Mon, 01 Sep 2025 07:52:29 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-45b88bff3ebso6042435e9.3 for ; Mon, 01 Sep 2025 00:52:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1756713147; x=1757317947; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=EtdbzRZe0eAw7PF7vrnaCVof0PecA0PGZWEqMiP05OQ=; b=sVu5V45IF1+T/YGASygfZ1ivNW69cXi6TRhJJXVMP2pKlcWJgboHOEGyupth/wHEds /EvdlHRv7y8/Ncogb76zGke9/uTxpIYgbkRauIXA58i4KC00xz2Ztxkef5rzzbIpCZyE 3xl5JUw9rnCsKqji+MkYCzjcNKD/x6ZrY60EFslJYPceo5Iz0nJj1ZHzJcwfTxr1U1JK nR3SBk99VDxLAXcAs7tkWyMTlQUtwlIbWkeed0U9Jr38re8GuOEDU4ZPs6OZT6+08Vg3 QjCRbvu5JXuPraKQO1z4fjURnTmPSzBHoir+6UaW+0INjctVU6mqGljpCPoCvaWbxiIq lVmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756713147; x=1757317947; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EtdbzRZe0eAw7PF7vrnaCVof0PecA0PGZWEqMiP05OQ=; b=o/FWecbggtw6MWcmSQQuck89cioJ5zdyeAagrms4lUYb6jJ8X8X2FE6nGQr08M078V nbXRqKY6F2a3Z4CeAstzeru5VgDnmr3eRjaQB14WB0wpm5RmLYf2220Pph0Pm/kFAVPZ YSGtT4WmIi/m+Z7PpVBy78nnWyv7tLs0aQLqVSpFc8ZItsb3Rnq5GV118LSULkQZXZoM bZLcEkADqBN+nXRJGo45pn5q0fDgk6iScpawUMJZkCXqFgdKhbk4w73b3Xle9zVKC06o gxhGjqKcheayJ8u+pqW7w5MSriUgiGKu7R+lXrXI7pCqjUJGWz1UI4w6wN8UHZFtoq7w XyYg== X-Forwarded-Encrypted: i=1; AJvYcCVGZihGiCynbmmmTJcCMO30Sn2PWdA8ov0Kzn0/hTMRrpbb1IbrSxKIcwqkN3xxr/9GUd1fgvBbb0cmCQ==@lists.postgresql.org X-Gm-Message-State: AOJu0YwPxShHC55e6BGKZrRvK7aPTLq+fi1DLCDUJ5R0UyVkIj+EJJEZ 55XUHw1yNrwiV2hlvDxpsk0H0urLXRulHvzMX666mjXgT7jl5Bp4SlCQr8L+7glPkiM= X-Gm-Gg: ASbGnctWcFwwI8xTM2gssICXkxeyhskvkWMNU3VHXt++6ee4yK01GHKpudZpMWyHcF/ c5uJZcusZbHK1EBSRoJCreSAdbWliKD5RkBgua00Niq99iFi8U2NqOGAvkuSWTI1WY3indyODxF ygMLFVGDG+9FTVsCbkK7VgNE8eOrAIKCqeW9K7kvy81kaiHp4LxH6ARomyc2ztWQuLmKCVhSZf3 On/+a7e0w2dIhdg9Yob/bUqoQg9SohaCCYSGJ7g3Nx0pQSlEj1YSFvgSDCCVMpAYJG/T9FhL3mI GcShtkEMfr87z5qFofS6AgP5eM5yj5+6y7D+w0dansfvyR0hjsrmslu4yYDnmYPDGxOYnDwD7Vd 8K6qhBBwJW5MDNcMCwizHfewsCizLfCJJGgZAbvdW1ebrwOYb+6bfVw== X-Google-Smtp-Source: AGHT+IEqRrsHIVNAVcxrMRgU+rrUi+OHHj0CAg4E2B0TzHuag4g3rUxVlYMSQenaqkSOhGNVYafxWA== X-Received: by 2002:a05:600c:450f:b0:45b:8795:4cab with SMTP id 5b1f17b1804b1-45b8a1e34bfmr37643405e9.33.1756713146998; Mon, 01 Sep 2025 00:52:26 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:260:5226:d240:7874:2b74:d01d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3cf33add504sm13938407f8f.30.2025.09.01.00.52.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 00:52:26 -0700 (PDT) Message-ID: Subject: Re: Query Spins From: Laurenz Albe To: Murthy Nunna , "pgsql-admin@lists.postgresql.org" Date: Mon, 01 Sep 2025 09:52:26 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-1.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2025-09-01 at 03:52 +0000, Murthy Nunna wrote: > Pg16.10 > =C2=A0 > I have a query which runs fine most of the time. When it runs fine, it sp= awns > parallel workers. In pg_stat_activity, wait_event is blank, state is acti= ve and > backend_type =3D "client backend" for the main query. For parallel worker= s of > this query I see wait_event =3D MessageQueueSend, state is active and > backend_type =3D "parallel worker" > =C2=A0 > But some times, it has no parallel workers. wait_event is blank, state is= active > and backend_type =3Dclient backend. And it never ends. It takes up lot of= CPU. > The socket on both server and client server are in ESTABLISHED state > (netstat -tulpa | grep ). Perhaps no workers are spawned because "max_parallel_workers" has already been exhausted by other backends. Check for the number of concurrent paral= lel workers next time you get the error. I cannot know the source of your performance problems, but perhaps it is a combination of system overload and lack of available parallel worker processes, which might well go together. Yours, Laurenz Albe