diff --git a/src/command/restore/restore.c b/src/command/restore/restore.c index 962562fc0..ba8a4ff7a 100644 --- a/src/command/restore/restore.c +++ b/src/command/restore/restore.c @@ -783,15 +783,15 @@ restoreCleanBuild(Manifest *manifest) { .manifest = manifest, .target = manifestTarget(manifest, targetIdx), + .delta = delta, + .fileIgnore = strLstNew(), }; cleanData->targetName = cleanData->target->name; cleanData->targetPath = manifestTargetPath(manifest, cleanData->target); cleanData->basePath = strEq(cleanData->targetName, MANIFEST_TARGET_PGDATA_STR); - cleanData->delta = delta; // Ignore backup.manifest while cleaning since it may exist from an prior incomplete restore - cleanData->fileIgnore = strLstNew(); strLstAdd(cleanData->fileIgnore, BACKUP_MANIFEST_FILE_STR); // Also ignore recovery files when recovery type = preserve diff --git a/src/db/db.c b/src/db/db.c index cf1c4ff6b..c750e0adc 100644 --- a/src/db/db.c +++ b/src/db/db.c @@ -76,10 +76,11 @@ dbNew(PgClient *client, ProtocolClient *remoteClient, const String *applicationN *this = (Db) { .memContext = memContextCurrent(), - .client = pgClientMove(client, memContextCurrent()), .remoteClient = remoteClient, .applicationName = strDup(applicationName), }; + + this->client = pgClientMove(client, this->memContext); } MEM_CONTEXT_NEW_END(); diff --git a/src/protocol/parallelJob.c b/src/protocol/parallelJob.c index be34db7dc..e28ddb476 100644 --- a/src/protocol/parallelJob.c +++ b/src/protocol/parallelJob.c @@ -52,8 +52,9 @@ protocolParallelJobNew(const Variant *key, ProtocolCommand *command) .memContext = memContextCurrent(), .state = protocolParallelJobStatePending, .key = varDup(key), - .command = protocolCommandMove(command, memContextCurrent()), }; + + this->command = protocolCommandMove(command, this->memContext); } MEM_CONTEXT_NEW_END();