Re: Pg stuck at 100% cpu, for multiple days - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: Pg stuck at 100% cpu, for multiple days
Date
Msg-id 554167aad0f6f2a2f6630dd24b6bafab2d9067d6.camel@cybertec.at
Whole thread Raw
In response to Pg stuck at 100% cpu, for multiple days  (hubert depesz lubaczewski <depesz@depesz.com>)
Responses Re: Pg stuck at 100% cpu, for multiple days
Re: Pg stuck at 100% cpu, for multiple days
List 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




pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: verify_heapam for sequences?
Next
From: Justin Pryzby
Date:
Subject: Re: Pg stuck at 100% cpu, for multiple days