On Mon, Aug 30, 2021 at 09:09:20PM +0200, Laurenz Albe wrote: > 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:
You might save a coredump of the process using gdb gcore before killing it, in case someone thinks how to debug it next month. Depending on your OS, you might have to do something special to get shared buffers included in the dump (or excluded, if that's what's desirable). I wonder how far up the stacktrace it's stuck ? You could set a breakpoint on LogicalDecodingProcessRecord and then "c"ontinue, and see if it hits the breakpoint in a few seconds. If not, try the next frame until you know which one is being called repeatedly. Maybe CheckForInterrupts should be added somewhere... -- Justin