when you delete a record:
0) the record is locked in exclusive mode using one lock table entry.
1) we generate a before-image log record (aka łnote˛) that contains a copy
of the record.
2) the record is removed from the data block it occupies but is replaced
with a łrowid reservation˛ so that another transaction cannot reuse the
rowid just yet (because if that happens, then the record cannot be put
back in its former location and a rollback would be impossible). once the
transaction has committed, the rowid reservation no longer applies.
3) the rowid reservation serves also as a record lock so we can (and do)
delete the lock table entry in memory since it is no longer needed.
when the transaction is rolled back:
4) we read the transactionąs before-iamge log records from back to front
5a) for deleted records, we replace the rowid reservation with the record
copy from the before-image log.
5b) we restore the exclusive lock.
6) for other operations we reverse their effect.
7) repeat steps 4 through 6 for remaining before-image records until we
get to the transaction begin record.
as you can see, rollback could consume quite a few lock table entries.
regards,
gus
3 Logicians walk into a bar.
The bartender asks if they'd all like a beer.
The first logician says "I don't know˛.
The second says "I donąt know˛.
Then the third exclaims "Yes!
On 2/19/16, 6:30 AM, "Marcos Kirchner" <
marcos....@totvs.com.br>
wrote:
>Hey Gus,
>
>How is it possible to overflow the lock table during backout? Everything
>the transaction touched is already locked I believe, right?
>Is it possible the a transaction will acquire more locks during rollback?
>
>
>
>Thanks,
>Marcos
>
>
>
>-----Mensagem original-----
>De: Gus Bjorklund [mailto:
g...@progress.com]
>Enviada em: quinta-feira, 18 de fevereiro de 2016 20:03
>Para: Brown, Gordon <
GBr...@iacgroup.com>;
d...@peg.com
>Assunto: Re: proutil -C increaseto parameter