关于PostgreSQL版本识别的详细介绍

  

今天小编给大家分享的是关于PostgreSQL版本识别的详细介绍,相信很多人都不太了解,为了让大家更加了解PostgreSQL版本识别,所以给大家总结了以下内容,一起往下看吧。一定会有所收获的哦。

插入\ \删除更新

Xid Xmin

Xmax xid_snapshot

堵塞

记录格式的定义:htup_details。1 h

2) ID postgres=# select * from txid_current ();   txid_current   --------------   1676   (1行)      3)进行一次插入后,看事务ID已经+ 1   postgres=#插入tt值(1);   插入0 1   postgres=#选择ctid xmin、xmax cmin, cmax, tt的id;   ctid | xmin | xmax | cmin | cmax | id   - - - - - - - - - - - - - + + - - - - - - - - - - - - + - - - - - - - - - - -   (0,1)| 1677 | 0 | 0 | 0 | 1   (1行)

4)更新

postgres=#开始;   开始      postgres=#更新tt组id=3;   更新1   postgres=#选择ctid xmin、xmax cmin, cmax, tt的id;   ctid | xmin | xmax | cmin | cmax | id   - - - - - - - - - - - - - + + - - - - - - - - - - - - + - - - - - - - - - - -   (0,2)| 1678 | 0 | 0 | 0 | 3   (1行)

5)在另外一个会话查看

postgres=#选择ctid xmin, xmax, cmin, cmax, tt的id;   ctid | xmin | xmax | cmin | cmax | id   - - - - - - - - - - - - - + + - - - - - - - - - - - - + - - - - - - - - - - -   (0,1)| 1677 | 1678 | 0 | 0 | 1   (1行)

看当前未结束的事务,或未开启的事务

postgres=# select * from txid_current_snapshot ();   txid_current_snapshot   -----------------------   1684:1684:   (1行)      从txid_current postgres=# select * ();   txid_current   --------------   1684   (1行)

- - - - - - - -。1比较pg pg 8192 6月10 04:19 0000   [pg@localhost pg_clog] $ pwd/home/pg/data/pg_clog

以上就是关于PostgreSQL版本识别的详细介绍了,看完之后是否有所收获呢?如果想了解更多相关内容,欢迎来行业资讯!

关于PostgreSQL版本识别的详细介绍