Updated on 2024-06-07 GMT+08:00

PCR UB-Tree

Compared with the RCR UB-tree, the PCR (page consistency read) UB-tree has the following features:
  • The transaction information of the index tuple is managed by the TD slot.
  • The undo operation is added. Before insertion and deletion, the undo log needs to be written. When a transaction is aborted, the rollback operation needs to be performed.
  • Flashback is supported.

When creating an index, you can set WITH option index_txntype to pcr or set the GUC parameter index_txntype to pcr to create a PCR UB-tree. If the WITH option or GUC parameter is not specified, an RCR UB-tree is created by default. The PCR UB-tree does not support online creation, ultimate RTO replay, and standby-node read.

In the current version, it may take a long time to roll back a large number of PCR indexes. (The rollback time may increase exponentially as the data volume increases. If the data volume is too large, the rollback may fail to be completely executed.) The rollback time will be optimized in later versions. The following table describes the rollback time specifications in the current version.

Table 1 PCR index rollback time specifications

Type/Data Volume

100

1000

10,000

100,000

1 million

Rollback time with PCR indexes

0.692 ms

9.610 ms

544.678 ms

52,963.754 ms

89,440,029.048 ms

Rollback time without PCR indexes

0.226 ms

0.916 ms

8.974 ms

94.903 ms

1206.177 ms

Ratio

3.06

10.49

60.70

558.08

74,151.66