Saturday, June 9, 2012

Killing idle sessions in Postgresql

Recently, i faced an issue with Postgresql with one table where it got locked due to some reason. I followed below steps to unlock it ::

1) connect to Postgresql using below command

ssh -L 5432:

2) Find idle processes using below command

ps -ef | grep postgres

Identify the process and note its id

3) connect to database using PG Admin tool

Fire below command from sql window



Ujjwal Soni

No comments: