Skip to content

Commit d2554c3

Browse files
author
Alexander Korotkov
committed
Fix 64-bit constants.
1 parent 8f97f25 commit d2554c3

File tree

6 files changed

+12
-14
lines changed

6 files changed

+12
-14
lines changed

src/backend/access/gist/gistutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ gistproperty(Oid index_oid, int attno,
905905
ObjectIdGetDatum(opcintype),
906906
ObjectIdGetDatum(opcintype),
907907
Int16GetDatum(procno));
908-
isnull = false;
908+
*isnull = false;
909909

910910
return true;
911911
}

src/backend/access/transam/slru.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
#include "storage/fd.h"
5858
#include "storage/shmem.h"
5959
#include "miscadmin.h"
60+
#include "utils/builtins.h"
6061

6162

6263
#define SlruFileName(ctl, path, seg) \

src/backend/access/transam/subtrans.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,6 @@ StartupSUBTRANS(TransactionId oldestActiveXID)
253253
{
254254
(void) ZeroSUBTRANSPage(startPage);
255255
startPage++;
256-
/* must account for wraparound */
257-
if (startPage > TransactionIdToPage(MaxTransactionId))
258-
startPage = 0;
259256
}
260257
(void) ZeroSUBTRANSPage(startPage);
261258

src/backend/executor/nodeModifyTable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ ExecCheckHeapTupleVisible(EState *estate,
207207
* visible to our snapshot. (This would happen, for example, if
208208
* conflicting keys are proposed for insertion in a single command.)
209209
*/
210-
if (!TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetXmin(tuple->t_data)))
210+
if (!TransactionIdIsCurrentTransactionId(HeapTupleGetXmin(tuple)))
211211
ereport(ERROR,
212212
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
213213
errmsg("could not serialize access due to concurrent update")));

src/include/access/multixact.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
* and epoch of the first segment, so we start assigning multixact values from
2121
* 2.
2222
*/
23-
#define InvalidMultiXactId ((MultiXactId) 0)
24-
#define FirstMultiXactId ((MultiXactId) 1)
25-
#define MaxMultiXactId ((MultiXactId) 0xFFFFFFFF)
23+
#define InvalidMultiXactId UINT64CONST(0)
24+
#define FirstMultiXactId UINT64CONST(1)
25+
#define MaxMultiXactId UINT64CONST(0xFFFFFFFFFFFFFFFF)
2626

2727
#define MultiXactIdIsValid(multi) ((multi) != InvalidMultiXactId)
2828

29-
#define MaxMultiXactOffset ((MultiXactOffset) 0xFFFFFFFF)
29+
#define MaxMultiXactOffset UINT64CONST(0xFFFFFFFFFFFFFFFF)
3030

3131
/* Number of SLRU buffers to use for multixact */
3232
#define NUM_MXACTOFFSET_BUFFERS 8

src/include/access/transam.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
* Note: if you need to change it, you must change pg_class.h as well.
2929
* ----------------
3030
*/
31-
#define InvalidTransactionId ((TransactionId) 0)
32-
#define BootstrapTransactionId ((TransactionId) 1)
33-
#define FrozenTransactionId ((TransactionId) 2)
34-
#define FirstNormalTransactionId ((TransactionId) 3)
35-
#define MaxTransactionId ((TransactionId) 0xFFFFFFFFFFFFFFFF)
31+
#define InvalidTransactionId UINT64CONST(0)
32+
#define BootstrapTransactionId UINT64CONST(1)
33+
#define FrozenTransactionId UINT64CONST(2)
34+
#define FirstNormalTransactionId UINT64CONST(3)
35+
#define MaxTransactionId UINT64CONST(0xFFFFFFFFFFFFFFFF)
3636
#define MaxShortTransactionId ((TransactionId) 0x7FFFFFFF)
3737

3838
/* ----------------

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