Re: Pg stuck at 100% cpu, for multiple days

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: depesz(at)depesz(dot)com, pgsql-hackers mailing list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Pg stuck at 100% cpu, for multiple days
Date: 2021-08-30 19:09:20
Message-ID: 554167aad0f6f2a2f6630dd24b6bafab2d9067d6.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2021-08-30 at 17:18 +0200, hubert depesz lubaczewski wrote:
> The thing is - I can't close it with pg_terminate_backend(), and I'd
> rather not kill -9, as it will, I think, close all other connections,
> and this is prod server.

Of course the cause should be fixed, but to serve your immediate need:

After calling pg_terminate_backend(), you can attach gdb to the backend and then run

print ProcessInterrupts()

That will cause the backend to exit normally without crashing the server.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-08-30 19:34:05 Re: Pg stuck at 100% cpu, for multiple days
Previous Message Mark Dilger 2021-08-30 19:00:41 Re: verify_heapam for sequences?