Search Postgresql Archives

a few questions (and doubts) about xid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI all,
apologize me for my stupid questions but I'd like to better understand how 
mvcc works. Now, each tuple has xmin (insert xid) and xmax (delete/update 
xid). In short each transaction with xmin<=xid<=xmax can see such tuple, 
otherwise it cannot (of course beeing xmin and xmax different transtaction 
from xid and beeing committed), isn't it?

Now, for subtrans the xid is laizyly obtained, due to efficiency purposes. But 
in such way subtrans xid should be greater than each other xid of concurrent 
(main) transactions. If the subtrans inserts a record is the subtrans xid 
placed in xmin? Because in this case the xmin value makes the tuple invisible 
to every other concurrent transaction started with the parent one. Is this 
true or do the subtrans commit with the parent xid (in this case why the 
subtrans should have a xid?)? Ok, I'm bit confused here....

Finally, the pg_class.relfrozenxid should not be set to the frozen value 
specified in transam.h when vacuum is executed? And what is its meaning for a 
newly created table (I see a value that I cannot understand)?

Thanks,
Luca


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux