Skip to content

Commit f8a58a4

Browse files
committed
gidsize to xact.h
1 parent 86f6183 commit f8a58a4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/include/access/twophase.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@
1515
#define TWOPHASE_H
1616

1717
#include "access/xlogdefs.h"
18+
#include "access/xact.h"
1819
#include "datatype/timestamp.h"
1920
#include "storage/lock.h"
2021

21-
/*
22-
* Maximum size of Global Transaction ID.
23-
*/
24-
#define GIDSIZE 200
25-
2622
/*
2723
* GlobalTransactionData is defined in twophase.c; other places have no
2824
* business knowing the internal definition.

src/include/access/xact.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
#include "storage/sinval.h"
2222
#include "utils/datetime.h"
2323

24+
/*
25+
* Maximum size of Global Transaction ID.
26+
*/
27+
#define GIDSIZE 200
2428

2529
/*
2630
* Xact isolation levels
@@ -224,7 +228,7 @@ typedef struct xl_xact_twophase
224228
* See details in XactLogCommitRecord().
225229
*/
226230
uint8 gidlen;
227-
char gid[200];
231+
char gid[GIDSIZE];
228232
} xl_xact_twophase;
229233
#define MinSizeOfXactTwophase offsetof(xl_xact_twophase, gid)
230234

@@ -285,7 +289,7 @@ typedef struct xl_xact_parsed_commit
285289
SharedInvalidationMessage *msgs;
286290

287291
TransactionId twophase_xid; /* only for 2PC */
288-
char twophase_gid[200]; // GIDSIZE
292+
char twophase_gid[GIDSIZE]; // GIDSIZE
289293

290294
XLogRecPtr origin_lsn;
291295
TimestampTz origin_timestamp;
@@ -303,7 +307,7 @@ typedef struct xl_xact_parsed_abort
303307
RelFileNode *xnodes;
304308

305309
TransactionId twophase_xid; /* only for 2PC */
306-
char twophase_gid[200]; // GIDSIZE
310+
char twophase_gid[GIDSIZE]; // GIDSIZE
307311
} xl_xact_parsed_abort;
308312

309313

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy