File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -766,12 +766,12 @@ CommandCounterIncrement(void)
766
766
if (currentCommandIdUsed )
767
767
{
768
768
currentCommandId += 1 ;
769
- if (currentCommandId == FirstCommandId ) /* check for overflow */
769
+ if (currentCommandId == InvalidCommandId )
770
770
{
771
771
currentCommandId -= 1 ;
772
772
ereport (ERROR ,
773
773
(errcode (ERRCODE_PROGRAM_LIMIT_EXCEEDED ),
774
- errmsg ("cannot have more than 2^32-1 commands in a transaction" )));
774
+ errmsg ("cannot have more than 2^32-2 commands in a transaction" )));
775
775
}
776
776
currentCommandIdUsed = false;
777
777
Original file line number Diff line number Diff line change @@ -368,6 +368,7 @@ typedef uint32 MultiXactOffset;
368
368
typedef uint32 CommandId ;
369
369
370
370
#define FirstCommandId ((CommandId) 0)
371
+ #define InvalidCommandId (~(CommandId)0)
371
372
372
373
/*
373
374
* Array indexing support
You can’t perform that action at this time.
0 commit comments