def get_stats_oldest_transaction_timestamp()

in postgresql_metrics/metrics_gatherer.py [0:0]


def get_stats_oldest_transaction_timestamp(_data_dir, db_connection):
    db_name, sec_since_oldest_xact_start = get_oldest_transaction_timestamp(db_connection)
    metrics = []
    if sec_since_oldest_xact_start is not None:
        metrics.append(metric_sec_since_oldest_xact_start(db_name, sec_since_oldest_xact_start))
    return metrics