From: Laurenz Albe <laurenz.albe@cybertec.at>
To: abbas alizadeh <ramkly@yahoo.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Kill postgresql process
Date: Mon, 14 Jun 2021 18:15:35 +0200
Message-ID: <37bda3bc33a441557fd658afc5dfbf3000f06d49.camel@cybertec.at> (raw)
In-Reply-To: <38E1E462-CA29-485F-9AC0-4339B9DB2913@yahoo.com>
References: <38E1E462-CA29-485F-9AC0-4339B9DB2913.ref@yahoo.com>
<38E1E462-CA29-485F-9AC0-4339B9DB2913@yahoo.com>
On Mon, 2021-06-14 at 23:41 +0800, abbas alizadeh wrote:
> How we can kill the stuck process?
> The process didn’t kill by pg_cancel_backend/pg_terminate_backend.
> Is there any way beside of using “kill -9” or “pg_ctl kill ABRT” ?
If you don't mind a little hackery, I found a simple way to
terminate backends that don't react to interrupts that avoids
"kill -9" and the ensuing crash recovery:
- Attach to the backend with gdb.
- Enter "print ProcessInterrupts()"
Of course that will not work if the backend is in uninterruptible
sleep (for example, stuck in an I/O operation).
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, ramkly@yahoo.com, pgsql-admin@lists.postgresql.org
Subject: Re: Kill postgresql process
In-Reply-To: <37bda3bc33a441557fd658afc5dfbf3000f06d49.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox