Insert\delete\updateLocate viactid, and view the changes in the recordxmin\xmax.
Xid: Database transactionID;
Xmin: Row headerxidInformation,xminrepresents the transaction that inserted the recordID
Xmax: Indicates deletion orlockThe transaction of this recordID
xid_snapshot: Ended in the current cluster Transaction
Clog: Transaction submission status log
Definition of record format: htup_details.h:POSTGRES heap tuple header definitions.
1) View allxidrelated functions. What is needed here istxid_currentFunction
##2)
can be seen Current transactionID
postgres=# select * from txid_current(); txid_current -------------- 1676 (1 row) 3)进行一次insert后,看事务ID已经+1 postgres=# insert into tt values(1); INSERT 0 1 postgres=# select ctid,xmin,xmax,cmin,cmax,id from tt; ctid | xmin | xmax | cmin | cmax | id -------+------+------+------+------+---- (0,1) | 1677 | 0 | 0 | 0 | 1 (1 row)
After opening a transaction, proceedupdate
postgres=# begin; BEGIN postgres=# update tt set id=3; UPDATE 1 postgres=# select ctid,xmin,xmax,cmin,cmax,id from tt; ctid | xmin | xmax | cmin | cmax | id -------+------+------+------+------+---- (0,2) | 1678 | 0 | 0 | 0 | 3 (1 row)
postgres=# select ctid,xmin,xmax,cmin,cmax,id from tt; ctid | xmin | xmax | cmin | cmax | id -------+------+------+------+------+---- (0,1) | 1677 | 1678 | 0 | 0 | 1 (1 row)
## in another session to see the current unfinished transactions or unopened transactions Transaction
##
postgres=# select *from txid_current_snapshot(); txid_current_snapshot ----------------------- 1684:1684: (1 row) postgres=# select * from txid_current(); txid_current -------------- 1684 (1 row)
Record whether the transaction is submitted, in In this file,
bit:
-rw-------. 1 pg pg 8192 Jun 10 04:19 0000 [pg@localhost pg_clog]$ pwd /home/pg/data/pg_clog
Explain what B/S and C/S are
How to achieve it through css3 html5 Vertical menu
#Related explanations about HTML5 local storage
The above is the detailed content of Detailed explanation of PostgreSQL version identification. For more information, please follow other related articles on the PHP Chinese website!