Skip to content

Commit

Permalink
Enhance debug information when validation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
poojanilangekar committed Sep 11, 2023
1 parent 8046951 commit 025b975
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pgxn/remotexact/validate.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void validate_index_scan(RWSetRelation *rw_rel)
if (page_lsn > read_csn) {
ereport(ERROR,
(errcode(ERRCODE_T_R_STATEMENT_COMPLETION_UNKNOWN),
errmsg("[remotexact] read out-of-date index data from a remote partition")));
errmsg("[remotexact] read out-of-date index data from a remote partition (index rel_id: %u)", relid)));
}
}

Expand Down Expand Up @@ -178,7 +178,7 @@ validate_table_scan(RWSetRelation *rw_rel)
CSNLogGetCSNByXid(current_region, checked_xid) > read_csn)
ereport(ERROR,
(errcode(ERRCODE_T_R_STATEMENT_COMPLETION_UNKNOWN),
errmsg("[remotexact] read out-of-date data from a remote partition")));
errmsg("[remotexact] read out-of-date data from a remote partition (table relid: %u)", relid)));

}

Expand Down Expand Up @@ -236,7 +236,7 @@ validate_tuple_scan(RWSetRelation *rw_rel)
if (!valid)
ereport(ERROR,
(errcode(ERRCODE_T_R_STATEMENT_COMPLETION_UNKNOWN),
errmsg("[remotexact] read out-of-date tuple data from a remote partition")));
errmsg("[remotexact] read out-of-date tuple data from a remote partition (tuple relid, tid: %u, %u)", relid,rw_rel->tuples[i].tid)));
}


Expand Down

0 comments on commit 025b975

Please sign in to comment.