File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2523,7 +2523,7 @@ MtmCreateLocalTableMap(void)
25232523 return htab ;
25242524}
25252525
2526- void MtmMakeRelationLocal (Oid relid )
2526+ static void MtmMakeRelationLocal (Oid relid )
25272527{
25282528 if (OidIsValid (relid )) {
25292529 MtmLock (LW_EXCLUSIVE );
@@ -2533,17 +2533,17 @@ void MtmMakeRelationLocal(Oid relid)
25332533}
25342534
25352535
2536- static void MtmMakeTableLocal (char * schema , char * name )
2536+ void MtmMakeTableLocal (char const * schema , char const * name )
25372537{
2538- RangeVar * rv = makeRangeVar (schema , name , -1 );
2538+ RangeVar * rv = makeRangeVar (( char * ) schema , ( char * ) name , -1 );
25392539 Oid relid = RangeVarGetRelid (rv , NoLock , true);
25402540 MtmMakeRelationLocal (relid );
25412541}
25422542
25432543
25442544typedef struct {
2545- NameData schema ;
2546- NameData name ;
2545+ text schema ;
2546+ text name ;
25472547} MtmLocalTablesTuple ;
25482548
25492549static void MtmLoadLocalTables (void )
@@ -2563,7 +2563,7 @@ static void MtmLoadLocalTables(void)
25632563 while (HeapTupleIsValid (tuple = systable_getnext (scan )))
25642564 {
25652565 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 ));
25672567 }
25682568
25692569 systable_endscan (scan );
Original file line number Diff line number Diff line change @@ -404,7 +404,7 @@ extern void MtmCheckQuorum(void);
404404extern bool MtmRecoveryCaughtUp (int nodeId , lsn_t walEndPtr );
405405extern void MtmCheckRecoveryCaughtUp (int nodeId , lsn_t slotLSN );
406406extern void MtmRecoveryCompleted (void );
407- extern void MtmMakeRelationLocal ( Oid relid );
407+ extern void MtmMakeTableLocal ( char const * schema , char const * name );
408408extern void MtmHandleApplyError (void );
409409extern void MtmUpdateLsnMapping (int nodeId , lsn_t endLsn );
410410extern 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)
860860 if (strcmp (RelationGetRelationName (rel ), MULTIMASTER_LOCAL_TABLES_TABLE ) == 0 &&
861861 strcmp (get_namespace_name (RelationGetNamespace (rel )), MULTIMASTER_SCHEMA_NAME ) == 0 )
862862 {
863- MtmMakeRelationLocal ( RelationGetRelid ( rel ));
863+ MtmMakeTableLocal ( TextDatumGetCString ( new_tuple . values [ 0 ]), TextDatumGetCString ( new_tuple . values [ 1 ] ));
864864 }
865865
866866 ExecResetTupleTable (estate -> es_tupleTable , true);
You can’t perform that action at this time.
0 commit comments