Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d2a241d

Browse files
author
Vladimir Ershov
committed
builds with 10 version
1 parent 2d7675d commit d2a241d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/scheduler_mtm.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
#include "catalog/namespace.h"
2727
#include "catalog/pg_proc.h"
2828
#include "utils/builtins.h"
29+
#include "pgstat.h"
2930
#include "dynloader.h"
31+
#if PG_VERSION_NUM >= 100000
32+
#include "utils/regproc.h"
33+
#endif
3034

3135
#include "char_array.h"
3236
#include "pgpro_scheduler.h"
@@ -285,8 +289,12 @@ void set_mtm_node_status(bool status)
285289

286290
new_tuple = heap_modify_tuple(
287291
tuple, nodes_heap->rd_att, values, nulls, replace);
292+
#if PG_VERSION_NUM < 100000
288293
simple_heap_update(nodes_heap, &new_tuple->t_self, new_tuple);
289294
CatalogUpdateIndexes(nodes_heap, new_tuple);
295+
#else
296+
CatalogTupleUpdate(nodes_heap, &new_tuple->t_self, new_tuple);
297+
#endif
290298
heap_freetuple(new_tuple);
291299
}
292300
else
@@ -296,8 +304,12 @@ void set_mtm_node_status(bool status)
296304
values[2] = TimestampTzGetDatum(GetCurrentTimestamp());
297305

298306
tuple = heap_form_tuple(nodes_heap->rd_att, values, nulls);
307+
#if PG_VERSION_NUM < 100000
299308
simple_heap_insert(nodes_heap, tuple);
300309
CatalogUpdateIndexes(nodes_heap, tuple);
310+
#else
311+
CatalogTupleInsert(nodes_heap, tuple);
312+
#endif
301313
heap_freetuple(tuple);
302314
}
303315

@@ -307,7 +319,11 @@ void set_mtm_node_status(bool status)
307319
{
308320
if(tuple)
309321
{
322+
#if PG_VERSION_NUM < 100000
310323
simple_heap_delete(nodes_heap, &tuple->t_self);
324+
#else
325+
CatalogTupleDelete(nodes_heap, &tuple->t_self);
326+
#endif
311327
}
312328
}
313329
index_endscan(indexScan);

0 commit comments

Comments
 (0)