1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-09 22:41:56 +03:00

Added long-standing transaction when restoring BLOBS (uses commit every BLOB_BATCH_SIZE)

Prevent dumping of languages from template1.
This commit is contained in:
Philip Warner
2000-10-31 14:20:30 +00:00
parent 0babf31640
commit 44954fae08
8 changed files with 109 additions and 21 deletions

View File

@ -627,6 +627,8 @@ static void _LoadBlobs(ArchiveHandle* AH, RestoreOptions *ropt)
int cnt;
char buf[4096];
StartRestoreBlobs(AH);
th = tarOpen(AH, NULL, 'r'); /* Open next file */
while (th != NULL)
{
@ -652,21 +654,8 @@ static void _LoadBlobs(ArchiveHandle* AH, RestoreOptions *ropt)
th = tarOpen(AH, NULL, 'r');
}
/*
* ctx->blobToc = tarOpen(AH, "blobs.toc", 'r');
*
* _getBlobTocEntry(AH, &oid, fname);
*
* while(oid != 0)
* {
* StartRestoreBlob(AH, oid);
* _PrintFileData(AH, fname, ropt);
* EndRestoreBlob(AH, oid);
* _getBlobTocEntry(AH, &oid, fname);
* }
*
* tarClose(AH, ctx->blobToc);
*/
EndRestoreBlobs(AH);
}