File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1453,7 +1453,11 @@ dmq_receiver_loop(PG_FUNCTION_ARGS)
1453
1453
extra = dmq_receiver_start_hook (sender_name );
1454
1454
1455
1455
/* do not hold globalxmin. XXX: try to carefully release snaps */
1456
+ #if PG_VERSION_NUM < 150000
1456
1457
MyProc -> xmin = InvalidTransactionId ;
1458
+ #else
1459
+ pg_atomic_write_u64 (& MyProc -> xmin , InvalidTransactionId );
1460
+ #endif
1457
1461
1458
1462
for (;;)
1459
1463
{
Original file line number Diff line number Diff line change 24
24
#include "nodes/makefuncs.h"
25
25
26
26
#include "utils/builtins.h"
27
+ #if PG_VERSION_NUM < 150000
27
28
#include "utils/int8.h"
29
+ #endif
28
30
#include "utils/inval.h"
29
31
#include "utils/varlena.h"
30
32
#include "utils/lsyscache.h"
@@ -378,13 +380,26 @@ parse_param_bool(DefElem *elem)
378
380
static uint32
379
381
parse_param_uint32 (DefElem * elem )
380
382
{
383
+ #if PG_VERSION_NUM < 150000
381
384
int64 res ;
382
385
383
386
if (!scanint8 (strVal (elem -> arg ), true, & res ))
384
387
ereport (ERROR ,
385
388
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
386
389
MTM_ERRMSG ("could not parse integer value \"%s\" for parameter \"%s\"" ,
387
390
strVal (elem -> arg ), elem -> defname )));
391
+ #else
392
+ unsigned long res ;
393
+ char * endptr ;
394
+
395
+ errno = 0 ;
396
+ res = strtoul (strVal (elem -> arg ), & endptr , 10 );
397
+ if (errno != 0 || * endptr != '\0' )
398
+ ereport (ERROR ,
399
+ (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
400
+ MTM_ERRMSG ("could not parse integer value \"%s\" for parameter \"%s\"" ,
401
+ strVal (elem -> arg ), elem -> defname )));
402
+ #endif
388
403
389
404
if (res > PG_UINT32_MAX || res < 0 )
390
405
ereport (ERROR ,
Original file line number Diff line number Diff line change 44
44
#include "utils/builtins.h"
45
45
#include "utils/catcache.h"
46
46
#include "utils/guc.h"
47
+ #if PG_VERSION_NUM < 150000
47
48
#include "utils/int8.h"
49
+ #endif
48
50
#include "utils/inval.h"
49
51
#include "utils/lsyscache.h"
50
52
#include "utils/memutils.h"
You can’t perform that action at this time.
0 commit comments