Forum Post: RE: transaction

  • Thread starter Thread starter gus
  • Start date Start date
Status
Not open for further replies.
G

gus

Guest
@steph: the RELEASE statement is not for releasing locks. it is for releasing /buffers/. it causes the specified buffer to be cleared so that it contains nothing. if necessary, its contents will first be sent to the database (e.g. if a new row was created or a row was updated) and then it will be cleared, which has the effect of ending its scope even though its lexical scope may be longer. this clearing of the buffer also has the effect of ending or reducing the "lock scope". if the buffer contains a row with a lock and it is released inside a transaction, then the buffer will be cleared but the row lock will not be released /until the transaction ends/. if the buffer contains a row with a share lock and it is released outside a transaction, then the row lock will be released when the buffer is cleared. if the buffer contains a row with a NO-LOCK then there is no lock to release when the buffer is cleared and inside or outside a transaction makes no difference. note that after you release a buffer, you can read something else into it (or even the same thing).

Continue reading...
 
Status
Not open for further replies.
Back
Top