Skip to content

Commit

Permalink
[MERGE PG13][yugabyte#14506] Fix YbClearCurrentTransactionId()
Browse files Browse the repository at this point in the history
Summary:
YbClearCurrentTransactionId() was introduced to handle temp tables created during concurrent
materialized view refreshes correctly.
PG13 no longer uses `CurrentTransactionState->transactionId` and `MyPgXact`. This diff changes the
code to use the PG13 equivalent of these fields/structures -
`CurrentTransactionState->fullTransactionId` and `MyProc->xid`.

Test Plan: Jenkins: skip

Reviewers: neil, smishra

Reviewed By: neil, smishra

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D21721
  • Loading branch information
fizaaluthra authored and nocaway committed Jul 20, 2023
1 parent 85d6668 commit b15ae1e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/postgres/src/backend/access/transam/xact.c
Original file line number Diff line number Diff line change
Expand Up @@ -6477,12 +6477,6 @@ void YBClearDdlHandles()

void YbClearCurrentTransactionId()
{
#ifdef YB_TODO
/* YB_TODO(fizaa@yugabyte).
* - PG13 data structures no longer have these fields.
* - Need to reimplement clearing data accordingly to PG13.
*/
CurrentTransactionState->transactionId = InvalidTransactionId;
MyPgXact->xid = InvalidTransactionId;
#endif
CurrentTransactionState->fullTransactionId = InvalidFullTransactionId;
MyProc->xid = InvalidTransactionId;
}

0 comments on commit b15ae1e

Please sign in to comment.