Re: Query Spins

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Murthy Nunna <mnunna(at)fnal(dot)gov>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Query Spins
Date: 2025-09-01 07:52:26
Message-ID: fff6e3ab84fdc0861701469d78f5d8a099ddf22e.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, 2025-09-01 at 03:52 +0000, Murthy Nunna wrote:
> Pg16.10
>  
> I have a query which runs fine most of the time. When it runs fine, it spawns
> parallel workers. In pg_stat_activity, wait_event is blank, state is active and
> backend_type = "client backend" for the main query. For parallel workers of
> this query I see wait_event = MessageQueueSend, state is active and
> backend_type = "parallel worker"
>  
> But some times, it has no parallel workers. wait_event is blank, state is active
> and backend_type =client 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 <client_port>).

Perhaps no workers are spawned because "max_parallel_workers" has already
been exhausted by other backends. Check for the number of concurrent parallel
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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Mauricio Fernandez 2025-09-03 15:50:57 Adding timestamp column
Previous Message Murthy Nunna 2025-09-01 03:52:10 Query Spins