From 775f1b379e3a282140f60ef65a11d1444dc80ccf Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Mon, 2 Feb 2009 20:07:37 +0000 Subject: Provide for parallel restoration from a custom format archive. Each data and post-data step is run in a separate worker child (a thread on Windows, a child process elsewhere) up to the concurrent number specified by the new pg_restore command-line --multi-thread | -m switch. Andrew Dunstan, with some editing by Tom Lane. --- src/bin/pg_dump/pg_backup_tar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/bin/pg_dump/pg_backup_tar.c') diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c index ddab506bf4..0156bbf9f0 100644 --- a/src/bin/pg_dump/pg_backup_tar.c +++ b/src/bin/pg_dump/pg_backup_tar.c @@ -16,7 +16,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.62 2007/11/15 21:14:41 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.63 2009/02/02 20:07:37 adunstan Exp $ * *------------------------------------------------------------------------- */ @@ -143,6 +143,7 @@ InitArchiveFmt_Tar(ArchiveHandle *AH) AH->WriteBufPtr = _WriteBuf; AH->ReadBufPtr = _ReadBuf; AH->ClosePtr = _CloseArchive; + AH->ReopenPtr = NULL; AH->PrintTocDataPtr = _PrintTocData; AH->ReadExtraTocPtr = _ReadExtraToc; AH->WriteExtraTocPtr = _WriteExtraToc; @@ -152,6 +153,8 @@ InitArchiveFmt_Tar(ArchiveHandle *AH) AH->StartBlobPtr = _StartBlob; AH->EndBlobPtr = _EndBlob; AH->EndBlobsPtr = _EndBlobs; + AH->ClonePtr = NULL; + AH->DeClonePtr = NULL; /* * Set up some special context used in compressing data. @@ -1383,5 +1386,4 @@ _tarWriteHeader(TAR_MEMBER *th) if (fwrite(h, 1, 512, th->tarFH) != 512) die_horribly(th->AH, modulename, "could not write to output file: %s\n", strerror(errno)); - } -- cgit v1.2.1