Thread: How to release a transaction lock on a table

How to release a transaction lock on a table

From
"info"
Date:
Dear All,
I have some open locks on some table in my postgre data base. I have closed every application, I have restarted the DB, and I have also restart the server machine itself. but the lock is still their.
 
do u have a way to relese these locks
 
regards
 
AJ 

Re: How to release a transaction lock on a table

From
Tom Lane
Date:
"info" <info@el-ixir.com> writes:
> I have some open locks on some table in my postgre data base. I have closed every application, I have restarted the
DB,and I have also restart the server machine itself. but the lock is still their. 

select * from pg_prepared_xacts;

commit or rollback as appropriate

            regards, tom lane

Re: How to release a transaction lock on a table

From
"info"
Date:
Dear Sir,

thanks . I have tried to commit the transaction using PREPCOMMIT but the
statement is not supported by my postgre.
I am using postgre version 8.1.10. I can not batch postgre.  is their
another ways to solve this problem

best regards

Ammar
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "info" <info@el-ixir.com>
Cc: <pgsql-novice@postgresql.org>
Sent: Thursday, January 08, 2009 8:46 PM
Subject: Re: [NOVICE] How to release a transaction lock on a table


> "info" <info@el-ixir.com> writes:
>> I have some open locks on some table in my postgre data base. I have
>> closed every application, I have restarted the DB, and I have also
>> restart the server machine itself. but the lock is still their.
>
> select * from pg_prepared_xacts;
>
> commit or rollback as appropriate
>
> regards, tom lane
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice


Re: How to release a transaction lock on a table

From
Tom Lane
Date:
"info" <info@el-ixir.com> writes:
> thanks . I have tried to commit the transaction using PREPCOMMIT but the
> statement is not supported by my postgre.

It's spelled COMMIT PREPARED.  Perhaps you need to spend more time
reading the fine manual.

            regards, tom lane