Re: Access to transaction status
От | Christian Plattner |
---|---|
Тема | Re: Access to transaction status |
Дата | |
Msg-id | 019f01c33728$01f663d0$6e828481@ethz.ch обсуждение исходный текст |
Ответ на | Access to transaction status ("Christian Plattner" <plattner@inf.ethz.ch>) |
Ответы |
Re: Access to transaction status
|
Список | pgsql-hackers |
----- Original Message ----- From: "Tom Lane" <tgl@sss.pgh.pa.us> > How much later? clog is not kept forever. I took a deeper look into the source. Forget my last posting. As far as I understand your code there is only one chance that information in clog gets lost: If XIDs are reused then ExtendCLOG will overwrite existing entries. Also, it seems to me that VACCUM has not effect on the clog. Now let's assume that there is a GET_XID_STATUS(xid) function. If at the time "GET_XID_STATUS(xid)" gets executed 'xid' has not been reused (which only should occur after about 4 billion transactions following xid), then the mechanism should work. If one uses "TransactionIdPrecedes" to check if xid is in the past (as in my sample code), then the window is restricted to 2 billion transactions, which seems enough for me. I implemented this check so that the clog lookup code does not try to fetch pages that do not yet exist (which crashes the backend) if one supplies a wrong xid. What do you think? Thanks, Christian
В списке pgsql-hackers по дате отправления: