Insert\delete\updateLocate via ctid, and view the changes in the record xmin\xmax.
Xid: Database transaction ID;
Xmin: Row header xidInformation, xmin represents the transaction that inserted the recordID
Xmax : Indicates deletion or lockThe 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 all xid related functions. What is needed here is txid_currentFunction
##2)
can be seen Current transaction ID
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, proceed update
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!