By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,692 Members | 1,998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,692 IT Pros & Developers. It's quick & easy.

Problem with lock?

P: n/a
I run the following SQL before updating one table:

"lock table tablename"

but when I try do update the same table later on, the lock table command
just hangs (i.e the table is already locked).
It was my understanding that this lock was removed when I call commit or
do I have to explicitly unlock the table somehow?
Regards,

BTJ

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
It looks like it was a one time happening... I restarted the database
and then tried again and then it all worked like a charm.... Hmmm....

BTJ

On Tue, 2003-09-30 at 12:33, Bjørn T Johansen wrote:
I run the following SQL before updating one table:

"lock table tablename"

but when I try do update the same table later on, the lock table
command just hangs (i.e the table is already locked).
It was my understanding that this lock was removed when I call commit
or do I have to explicitly unlock the table somehow?
Regards,

BTJ

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #2

P: n/a
Bjørn T Johansen writes:
I run the following SQL before updating one table:

"lock table tablename"

but when I try do update the same table later on, the lock table command
just hangs (i.e the table is already locked).
It was my understanding that this lock was removed when I call commit or
do I have to explicitly unlock the table somehow?


Show us what commands you are running, in what sequence, how many
sessions, etc.

--
Peter Eisentraut pe*****@gmx.net
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.