UnlockRelationId(&dstrelid, AccessShareLock);
}
+ pfree(srcpath);
+ pfree(dstpath);
list_free_deep(rnodelist);
}
(void) XLogInsert(RM_DBASE_ID,
XLOG_DBASE_CREATE_FILE_COPY | XLR_SPECIAL_REL_UPDATE);
}
+ pfree(srcpath);
+ pfree(dstpath);
}
table_endscan(scan);
table_close(rel, AccessShareLock);
/* Now it's safe to release the database lock */
UnlockSharedObjectForSession(DatabaseRelationId, db_id, 0,
AccessExclusiveLock);
+
+ pfree(src_dbpath);
+ pfree(dst_dbpath);
}
/* Error cleanup callback for movedb */
dstpath = GetDatabasePath(fparms->dest_dboid, fparms->dest_tsoid);
(void) rmtree(dstpath, true);
+
+ pfree(dstpath);
}
/*
* We don't need to copy subdirectories
*/
copydir(src_path, dst_path, false);
+
+ pfree(src_path);
+ pfree(dst_path);
}
else if (info == XLOG_DBASE_CREATE_WAL_LOG)
{
/* Create the database directory with the version file. */
CreateDirAndVersionFile(dbpath, xlrec->db_id, xlrec->tablespace_id,
true);
+ pfree(dbpath);
}
else if (info == XLOG_DBASE_DROP)
{