You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-15 01:04:37 +02:00
Designated initializer cleanup.
Cleanup designated initializers created in b134175f
by moving struct members in or out for clarity.
This commit is contained in:
committed by
David Steele
parent
24d2494c82
commit
324f7cebe0
@ -783,15 +783,15 @@ restoreCleanBuild(Manifest *manifest)
|
|||||||
{
|
{
|
||||||
.manifest = manifest,
|
.manifest = manifest,
|
||||||
.target = manifestTarget(manifest, targetIdx),
|
.target = manifestTarget(manifest, targetIdx),
|
||||||
|
.delta = delta,
|
||||||
|
.fileIgnore = strLstNew(),
|
||||||
};
|
};
|
||||||
|
|
||||||
cleanData->targetName = cleanData->target->name;
|
cleanData->targetName = cleanData->target->name;
|
||||||
cleanData->targetPath = manifestTargetPath(manifest, cleanData->target);
|
cleanData->targetPath = manifestTargetPath(manifest, cleanData->target);
|
||||||
cleanData->basePath = strEq(cleanData->targetName, MANIFEST_TARGET_PGDATA_STR);
|
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
|
// Ignore backup.manifest while cleaning since it may exist from an prior incomplete restore
|
||||||
cleanData->fileIgnore = strLstNew();
|
|
||||||
strLstAdd(cleanData->fileIgnore, BACKUP_MANIFEST_FILE_STR);
|
strLstAdd(cleanData->fileIgnore, BACKUP_MANIFEST_FILE_STR);
|
||||||
|
|
||||||
// Also ignore recovery files when recovery type = preserve
|
// Also ignore recovery files when recovery type = preserve
|
||||||
|
@ -76,10 +76,11 @@ dbNew(PgClient *client, ProtocolClient *remoteClient, const String *applicationN
|
|||||||
*this = (Db)
|
*this = (Db)
|
||||||
{
|
{
|
||||||
.memContext = memContextCurrent(),
|
.memContext = memContextCurrent(),
|
||||||
.client = pgClientMove(client, memContextCurrent()),
|
|
||||||
.remoteClient = remoteClient,
|
.remoteClient = remoteClient,
|
||||||
.applicationName = strDup(applicationName),
|
.applicationName = strDup(applicationName),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this->client = pgClientMove(client, this->memContext);
|
||||||
}
|
}
|
||||||
MEM_CONTEXT_NEW_END();
|
MEM_CONTEXT_NEW_END();
|
||||||
|
|
||||||
|
@ -52,8 +52,9 @@ protocolParallelJobNew(const Variant *key, ProtocolCommand *command)
|
|||||||
.memContext = memContextCurrent(),
|
.memContext = memContextCurrent(),
|
||||||
.state = protocolParallelJobStatePending,
|
.state = protocolParallelJobStatePending,
|
||||||
.key = varDup(key),
|
.key = varDup(key),
|
||||||
.command = protocolCommandMove(command, memContextCurrent()),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this->command = protocolCommandMove(command, this->memContext);
|
||||||
}
|
}
|
||||||
MEM_CONTEXT_NEW_END();
|
MEM_CONTEXT_NEW_END();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user