File tree 3 files changed +8
-8
lines changed 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2522,7 +2522,7 @@ MtmCreateLocalTableMap(void)
2522
2522
return htab ;
2523
2523
}
2524
2524
2525
- void MtmMakeRelationLocal (Oid relid )
2525
+ static void MtmMakeRelationLocal (Oid relid )
2526
2526
{
2527
2527
if (OidIsValid (relid )) {
2528
2528
MtmLock (LW_EXCLUSIVE );
@@ -2532,17 +2532,17 @@ void MtmMakeRelationLocal(Oid relid)
2532
2532
}
2533
2533
2534
2534
2535
- static void MtmMakeTableLocal (char * schema , char * name )
2535
+ void MtmMakeTableLocal (char const * schema , char const * name )
2536
2536
{
2537
- RangeVar * rv = makeRangeVar (schema , name , -1 );
2537
+ RangeVar * rv = makeRangeVar (( char * ) schema , ( char * ) name , -1 );
2538
2538
Oid relid = RangeVarGetRelid (rv , NoLock , true);
2539
2539
MtmMakeRelationLocal (relid );
2540
2540
}
2541
2541
2542
2542
2543
2543
typedef struct {
2544
- NameData schema ;
2545
- NameData name ;
2544
+ text schema ;
2545
+ text name ;
2546
2546
} MtmLocalTablesTuple ;
2547
2547
2548
2548
static void MtmLoadLocalTables (void )
@@ -2562,7 +2562,7 @@ static void MtmLoadLocalTables(void)
2562
2562
while (HeapTupleIsValid (tuple = systable_getnext (scan )))
2563
2563
{
2564
2564
MtmLocalTablesTuple * t = (MtmLocalTablesTuple * ) GETSTRUCT (tuple );
2565
- MtmMakeTableLocal (NameStr ( t -> schema ), NameStr ( t -> name ));
2565
+ MtmMakeTableLocal (text_to_cstring ( & t -> schema ), text_to_cstring ( & t -> name ));
2566
2566
}
2567
2567
2568
2568
systable_endscan (scan );
Original file line number Diff line number Diff line change @@ -403,7 +403,7 @@ extern void MtmCheckQuorum(void);
403
403
extern bool MtmRecoveryCaughtUp (int nodeId , lsn_t walEndPtr );
404
404
extern void MtmCheckRecoveryCaughtUp (int nodeId , lsn_t slotLSN );
405
405
extern void MtmRecoveryCompleted (void );
406
- extern void MtmMakeRelationLocal ( Oid relid );
406
+ extern void MtmMakeTableLocal ( char const * schema , char const * name );
407
407
extern void MtmHandleApplyError (void );
408
408
extern void MtmUpdateLsnMapping (int nodeId , lsn_t endLsn );
409
409
extern lsn_t MtmGetFlushPosition (int nodeId );
Original file line number Diff line number Diff line change @@ -860,7 +860,7 @@ process_remote_insert(StringInfo s, Relation rel)
860
860
if (strcmp (RelationGetRelationName (rel ), MULTIMASTER_LOCAL_TABLES_TABLE ) == 0 &&
861
861
strcmp (get_namespace_name (RelationGetNamespace (rel )), MULTIMASTER_SCHEMA_NAME ) == 0 )
862
862
{
863
- MtmMakeRelationLocal ( RelationGetRelid ( rel ));
863
+ MtmMakeTableLocal ( TextDatumGetCString ( new_tuple . values [ 0 ]), TextDatumGetCString ( new_tuple . values [ 1 ] ));
864
864
}
865
865
866
866
ExecResetTupleTable (estate -> es_tupleTable , true);
You can’t perform that action at this time.
0 commit comments