From: abbas alizadeh <ramkly@yahoo.com>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Kill postgresql process
Date: Tue, 15 Jun 2021 00:32:40 +0800
Message-ID: <C26A3E91-96C6-41A7-BD6E-3FF203BDFC5D@yahoo.com> (raw)
In-Reply-To: <CAOBaU_ZWKKOX8za8r_iOYwMz5w+G84z31jyOMVzu0SCaLWie2Q@mail.gmail.com>
References: <CAOBaU_ZWKKOX8za8r_iOYwMz5w+G84z31jyOMVzu0SCaLWie2Q@mail.gmail.com>
The query was called by web server, It was connected to database through socket and connection wasn’t terminate. I tried to close the connection, but it didn’t work.
Postgres version is 9.2 for this case.
We use postgis and pg_repack
> On 14 Jun 2021, at 11:49 PM, Julien Rouhaud <rjuju123@gmail.com> wrote:
>
> On Mon, Jun 14, 2021 at 11:41 PM abbas alizadeh <ramkly@yahoo.com> 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” ?
>
> pg_cancel_backend / pg_terminate_backend is the normal way to do that.
> If it's not working it means there's something going on. Is it a
> regular backend, and if yes what query is it executing?
>
> Do you have any 3rd party extensions, and what is the postgres versions?
>
> If could also help to get a stack trace:
> https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend
>
>
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: ramkly@yahoo.com, rjuju123@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Kill postgresql process
In-Reply-To: <C26A3E91-96C6-41A7-BD6E-3FF203BDFC5D@yahoo.com>
* 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