Transaction-level advisory lock unlocking and transaction end

Started by Saimonabout 11 years ago2 messagesgeneral
Jump to latest
#1Saimon
aimon.slim@gmail.com

Hi,

I could not understand on the basis of documentation about transaction-level
advisory lock:

Transaction-level lock requests ... are automatically released at the end

of the transaction ...

So, what order will the use of transactions and unlock the lock?
The transaction would be applied at first and the lock would be unlocked
after it or vice versa?
Or any order in this case is not guaranteed?

Thanks a lot for your help.

Saimon

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Saimon (#1)
Re: Transaction-level advisory lock unlocking and transaction end

Saimon Lim <aimon.slim@gmail.com> writes:

Transaction-level lock requests ... are automatically released at the end
of the transaction ...

So, what order will the use of transactions and unlock the lock?
The transaction would be applied at first and the lock would be unlocked
after it or vice versa?
Or any order in this case is not guaranteed?

Locks are always released after the transaction has committed.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general