unable to kill locked user session!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

unable to kill locked user session!

dbatoCloud Solution
Hi All,

Someone help on the killing the user session. I tried to use it but still unable to kill it and no blocking session.

pg_terminate_backend(pid)
pg_cancel_backend(pid)

 Is there any other way to kill session?

 

Thanks & Best Wishes,

Ashok

 

---------------------------------------------------------------------------------------------------------------------

Ashokkumar Mani  (OCP12c/11g/10g/9i, AWS SAA, M103)

Dubai , UAE | BLR , INDIA

M: +971 54 723 0075 | +91 90086 70302 | WApp : +91 81975 99922

W: https://dbatocloudsolution.blogspot.in/ | E: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: unable to kill locked user session!

ganeshakorde


On Thu, 25 Feb 2021, 3:06 pm dbatoCloud Solution, <[hidden email]> wrote:
Hi All,

Someone help on the killing the user session. I tried to use it but still unable to kill it and no blocking session.

pg_terminate_backend(pid)
pg_cancel_backend(pid)

 Is there any other way to kill session?

 

Thanks & Best Wishes,

Ashok

 

---------------------------------------------------------------------------------------------------------------------

Ashokkumar Mani  (OCP12c/11g/10g/9i, AWS SAA, M103)

Dubai , UAE | BLR , INDIA

M: +971 54 723 0075 | +91 90086 70302 | WApp : +91 81975 99922

W: https://dbatocloudsolution.blogspot.in/ | E: [hidden email] 

If you have OS access, kill that process from OS.

Reply | Threaded
Open this post in threaded view
|

Re: unable to kill locked user session!

Julien Rouhaud
In reply to this post by dbatoCloud Solution
Hi,

On Thu, Feb 25, 2021 at 5:36 PM dbatoCloud Solution
<[hidden email]> wrote:
>
> Someone help on the killing the user session. I tried to use it but still unable to kill it and no blocking session.
>
> pg_terminate_backend(pid)
> pg_cancel_backend(pid)
>
>  Is there any other way to kill session?

If you're still using Aurora, you'll need to check its documentation
or ask its support as the behavior of those functions may be different
than community postgres.

Otherwise, you'll need to provide more information.  Can you show the
related rows in pg_stat_activity, the result when you tried to use
those functions and related postgres logs if any.


Reply | Threaded
Open this post in threaded view
|

Re: unable to kill locked user session!

Avinash Kumar
In reply to this post by ganeshakorde
Hi,

On Thu, Feb 25, 2021 at 7:30 AM Ganesh Korde <[hidden email]> wrote:


On Thu, 25 Feb 2021, 3:06 pm dbatoCloud Solution, <[hidden email]> wrote:
Hi All,

Someone help on the killing the user session. I tried to use it but still unable to kill it and no blocking session.

pg_terminate_backend(pid)
pg_cancel_backend(pid)

 Is there any other way to kill session?

Interested to see what is happening based on the output of pg_stat_activity. Is that some session that is connecting to a foreign server using some FDW ? 
Also, never attempt to kill a process using kill -9 as it may crash your PostgreSQL cluster with the following message. 
WARNING:  terminating connection because of crash of another server process
DETAIL:  The postmaster has commanded this server process to roll back the
current transaction and exit, because another server process exited
abnormally and possibly corrupted shared memory.
HINT:  In a moment you should be able to reconnect to the database and
repeat your command.
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

 

Thanks & Best Wishes,

Ashok

 

---------------------------------------------------------------------------------------------------------------------

Ashokkumar Mani  (OCP12c/11g/10g/9i, AWS SAA, M103)

Dubai , UAE | BLR , INDIA

M: +971 54 723 0075 | +91 90086 70302 | WApp : +91 81975 99922

W: https://dbatocloudsolution.blogspot.in/ | E: [hidden email] 

If you have OS access, kill that process from OS.



--
Regards,
Avinash Vallarapu
Reply | Threaded
Open this post in threaded view
|

Re: unable to kill locked user session!

Julien Rouhaud
In reply to this post by Julien Rouhaud
Please keep the list in Cc

On Thu, Feb 25, 2021 at 8:43 PM dbatoCloud Solution <[hidden email]> wrote:

 step 2)

image.png

Community postgres shouldn't report "[X]" when calling this function.  Are you using Aurora?
Reply | Threaded
Open this post in threaded view
|

Re: unable to kill locked user session!

dbatoCloud Solution
Hi Julien
Yes this Aurora PostgreSQL 10.13

 

 

Thanks & Best Wishes,

Ashok

 

---------------------------------------------------------------------------------------------------------------------

Ashokkumar Mani  (OCP12c/11g/10g/9i, AWS SAA, M103)

Dubai , UAE | BLR , INDIA

M: +971 54 723 0075 | +91 90086 70302 | WApp : +91 81975 99922

W: https://dbatocloudsolution.blogspot.in/ | E: [hidden email]



On Thu, Feb 25, 2021 at 6:38 PM Julien Rouhaud <[hidden email]> wrote:
Please keep the list in Cc

On Thu, Feb 25, 2021 at 8:43 PM dbatoCloud Solution <[hidden email]> wrote:

 step 2)

image.png

Community postgres shouldn't report "[X]" when calling this function.  Are you using Aurora?
Reply | Threaded
Open this post in threaded view
|

Re: unable to kill locked user session!

Julien Rouhaud
On Thu, Feb 25, 2021 at 9:18 PM dbatoCloud Solution
<[hidden email]> wrote:
>
> Hi Julien
> Yes this Aurora PostgreSQL 10.13

Then as I previously said, you need to check its documentation or ask
its support as the behavior of those functions may be different than
community postgres.