openGauss-server/contrib/pgxc_find_unconsistency
dengxuyue 1567043064 同步source code
日期: 12-26
    revision: ee5b054c
2020-12-28 22:19:21 +08:00
..
Readme.txt 同步source code 2020-12-28 22:19:21 +08:00
pgxc_find_unconsistency.sh first commit for openGauss server 2020-06-30 17:38:27 +08:00

Readme.txt

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

pgxc_find_unconsistency.sh is the script used for consistency checking. To find which transactions have wrong status with 'committed' and 'aborted' on different nodes in database cluster.
It shouldn't ocurr in normal situation. If some xids are found in xillist, we should analyse these xids using pgxc_xacts_iscommitted() and other views or functions for further investigation .

Format:
sh pgxc_find_unconsistency.sh dbname portnum

The function pgxc_parse_clog called in this script is a function extended from pg_parse_clog to show the status of all of the transactions fors nodes in the cluster. 
pg_parse_clog is a function shows all of the transaction's status in current node. The input parameters for pgxc_parse_clog or pg_parse_clog are null.
Normally users needn't call these two functions directly, just need to run the  pgxc_find_unconsistency.sh to find unconsistency if exists. 
And users can use pgxc_xacts_iscomitted(xid) to check the status of a transaction with id 'xid'. The type of input parameter 'xid' is int8.