Questions tagged «mvcc»

2
如何确定行的可见性?
在最简单的情况下,当我们在表中插入新行(并且提交事务)时,所有后续事务都将看到该行。xmax在此示例中看到为0: CREATE TABLE vis ( id serial, is_active boolean ); INSERT INTO vis (is_active) VALUES (FALSE); SELECT ctid, xmin, xmax, * FROM vis; ctid │xmin │ xmax │ id │ is_active ───────┼─────┼──────┼────┼─────────── (0,1) │2699 │ 0 │ 1 │ f 当我们更新它时(因为该标志被FALSE意外设置为),它会发生一些变化: UPDATE vis SET is_active = TRUE; SELECT ctid, xmin, …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.