From: Pavan Deolasee Date: Wed, 4 May 2016 18:36:26 +0000 (+0530) Subject: Extend CLog, Subtrans log and CommitTsLog appropriately when an XID is received X-Git-Tag: XL9_5_R1_1~14 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=3cefb0ac040abaf29a7b4ce7a2e7cd4f304925c6;p=postgres-xl.git Extend CLog, Subtrans log and CommitTsLog appropriately when an XID is received from a remote node --- diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 7986aa75ea..2a14c3cc1b 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -6792,6 +6792,15 @@ SetTopTransactionId(GlobalTransactionId xid) Assert(!GlobalTransactionIdIsValid(s->transactionId) || GlobalTransactionIdEquals(s->transactionId, xid)); + /* + * Also extend the CLOG, SubtransLog and CommitTsLog to ensure that this + * XID can later be referenced correctly + * + * Normally this happens in the GetNextLocalTransactionId() path, but that + * may not be ever called when XID is received from the remote node + */ + ExtendLogs(xid); + if (!IsConnFromDatanode()) { XactTopTransactionId = s->transactionId = xid;