diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2009-02-02 20:07:37 +0000 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2009-02-02 20:07:37 +0000 |
commit | 775f1b379e3a282140f60ef65a11d1444dc80ccf (patch) | |
tree | 9d6a1320d8d85588d927c45096df47e9044d6248 /src/bin/pg_dump/pg_backup.h | |
parent | 3a5b77371522b64feda006a7aed2a0e57bfb2b22 (diff) |
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.
Diffstat (limited to 'src/bin/pg_dump/pg_backup.h')
-rw-r--r-- | src/bin/pg_dump/pg_backup.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_backup.h b/src/bin/pg_dump/pg_backup.h index fa7e2d55f13..72bc066853e 100644 --- a/src/bin/pg_dump/pg_backup.h +++ b/src/bin/pg_dump/pg_backup.h @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup.h,v 1.48 2009/01/05 16:54:36 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup.h,v 1.49 2009/02/02 20:07:36 adunstan Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,14 @@ typedef enum _archiveMode archModeRead } ArchiveMode; +typedef enum _teSection +{ + SECTION_NONE = 1, /* COMMENTs, ACLs, etc; can be anywhere */ + SECTION_PRE_DATA, /* stuff to be processed before data */ + SECTION_DATA, /* TABLE DATA, BLOBS, BLOB COMMENTS */ + SECTION_POST_DATA /* stuff to be processed after data */ +} teSection; + /* * We may want to have some more user-readable data, but in the mean * time this gives us some abstraction and type checking. @@ -124,6 +132,7 @@ typedef struct _restoreOptions int suppressDumpWarnings; /* Suppress output of WARNING entries * to stderr */ bool single_txn; + int number_of_threads; bool *idWanted; /* array showing which dump IDs to emit */ } RestoreOptions; @@ -152,7 +161,8 @@ extern void ArchiveEntry(Archive *AHX, const char *tag, const char *namespace, const char *tablespace, const char *owner, bool withOids, - const char *desc, const char *defn, + const char *desc, teSection section, + const char *defn, const char *dropStmt, const char *copyStmt, const DumpId *deps, int nDeps, DataDumperPtr dumpFn, void *dumpArg); |