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 @@ -2523,7 +2523,7 @@ MtmCreateLocalTableMap(void)
2523
2523
return htab ;
2524
2524
}
2525
2525
2526
- void MtmMakeRelationLocal (Oid relid )
2526
+ static void MtmMakeRelationLocal (Oid relid )
2527
2527
{
2528
2528
if (OidIsValid (relid )) {
2529
2529
MtmLock (LW_EXCLUSIVE );
@@ -2533,17 +2533,17 @@ void MtmMakeRelationLocal(Oid relid)
2533
2533
}
2534
2534
2535
2535
2536
- static void MtmMakeTableLocal (char * schema , char * name )
2536
+ void MtmMakeTableLocal (char const * schema , char const * name )
2537
2537
{
2538
- RangeVar * rv = makeRangeVar (schema , name , -1 );
2538
+ RangeVar * rv = makeRangeVar (( char * ) schema , ( char * ) name , -1 );
2539
2539
Oid relid = RangeVarGetRelid (rv , NoLock , true);
2540
2540
MtmMakeRelationLocal (relid );
2541
2541
}
2542
2542
2543
2543
2544
2544
typedef struct {
2545
- NameData schema ;
2546
- NameData name ;
2545
+ text schema ;
2546
+ text name ;
2547
2547
} MtmLocalTablesTuple ;
2548
2548
2549
2549
static void MtmLoadLocalTables (void )
@@ -2563,7 +2563,7 @@ static void MtmLoadLocalTables(void)
2563
2563
while (HeapTupleIsValid (tuple = systable_getnext (scan )))
2564
2564
{
2565
2565
MtmLocalTablesTuple * t = (MtmLocalTablesTuple * ) GETSTRUCT (tuple );
2566
- MtmMakeTableLocal (NameStr ( t -> schema ), NameStr ( t -> name ));
2566
+ MtmMakeTableLocal (text_to_cstring ( & t -> schema ), text_to_cstring ( & t -> name ));
2567
2567
}
2568
2568
2569
2569
systable_endscan (scan );
Original file line number Diff line number Diff line change @@ -404,7 +404,7 @@ extern void MtmCheckQuorum(void);
404
404
extern bool MtmRecoveryCaughtUp (int nodeId , lsn_t walEndPtr );
405
405
extern void MtmCheckRecoveryCaughtUp (int nodeId , lsn_t slotLSN );
406
406
extern void MtmRecoveryCompleted (void );
407
- extern void MtmMakeRelationLocal ( Oid relid );
407
+ extern void MtmMakeTableLocal ( char const * schema , char const * name );
408
408
extern void MtmHandleApplyError (void );
409
409
extern void MtmUpdateLsnMapping (int nodeId , lsn_t endLsn );
410
410
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