PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pg_backup_archiver.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_backup_archiver.h
4  *
5  * Private interface to the pg_dump archiver routines.
6  * It is NOT intended that these routines be called by any
7  * dumper directly.
8  *
9  * See the headers to pg_restore for more details.
10  *
11  * Copyright (c) 2000, Philip Warner
12  * Rights are granted to use this software in any way so long
13  * as this notice is not removed.
14  *
15  * The author is not responsible for loss or damages that may
16  * result from it's use.
17  *
18  *
19  * IDENTIFICATION
20  * src/bin/pg_dump/pg_backup_archiver.h
21  *
22  *-------------------------------------------------------------------------
23  */
24 #ifndef __PG_BACKUP_ARCHIVE__
25 #define __PG_BACKUP_ARCHIVE__
26 
27 
28 #include <time.h>
29 
30 #include "pg_backup.h"
31 
32 #include "libpq-fe.h"
33 #include "pqexpbuffer.h"
34 
35 #define LOBBUFSIZE 16384
36 
37 /*
38  * Note: zlib.h must be included *after* libpq-fe.h, because the latter may
39  * include ssl.h, which has a naming conflict with zlib.h.
40  */
41 #ifdef HAVE_LIBZ
42 #include <zlib.h>
43 #define GZCLOSE(fh) gzclose(fh)
44 #define GZWRITE(p, s, n, fh) gzwrite(fh, p, (n) * (s))
45 #define GZREAD(p, s, n, fh) gzread(fh, p, (n) * (s))
46 #define GZEOF(fh) gzeof(fh)
47 #else
48 #define GZCLOSE(fh) fclose(fh)
49 #define GZWRITE(p, s, n, fh) (fwrite(p, s, n, fh) * (s))
50 #define GZREAD(p, s, n, fh) fread(p, s, n, fh)
51 #define GZEOF(fh) feof(fh)
52 /* this is just the redefinition of a libz constant */
53 #define Z_DEFAULT_COMPRESSION (-1)
54 
55 typedef struct _z_stream
56 {
57  void *next_in;
58  void *next_out;
59  size_t avail_in;
60  size_t avail_out;
61 } z_stream;
63 #endif
64 
65 /* Data block types */
66 #define BLK_DATA 1
67 #define BLK_BLOBS 3
68 
69 /* Encode version components into a convenient integer <maj><min><rev> */
70 #define MAKE_ARCHIVE_VERSION(major, minor, rev) (((major) * 256 + (minor)) * 256 + (rev))
71 
72 #define ARCHIVE_MAJOR(version) (((version) >> 16) & 255)
73 #define ARCHIVE_MINOR(version) (((version) >> 8) & 255)
74 #define ARCHIVE_REV(version) (((version) ) & 255)
75 
76 /* Historical version numbers (checked in code) */
77 #define K_VERS_1_0 MAKE_ARCHIVE_VERSION(1, 0, 0)
78 #define K_VERS_1_2 MAKE_ARCHIVE_VERSION(1, 2, 0) /* Allow No ZLIB */
79 #define K_VERS_1_3 MAKE_ARCHIVE_VERSION(1, 3, 0) /* BLOBs */
80 #define K_VERS_1_4 MAKE_ARCHIVE_VERSION(1, 4, 0) /* Date & name in header */
81 #define K_VERS_1_5 MAKE_ARCHIVE_VERSION(1, 5, 0) /* Handle dependencies */
82 #define K_VERS_1_6 MAKE_ARCHIVE_VERSION(1, 6, 0) /* Schema field in TOCs */
83 #define K_VERS_1_7 MAKE_ARCHIVE_VERSION(1, 7, 0) /* File Offset size in
84  * header */
85 #define K_VERS_1_8 MAKE_ARCHIVE_VERSION(1, 8, 0) /* change interpretation
86  * of ID numbers and
87  * dependencies */
88 #define K_VERS_1_9 MAKE_ARCHIVE_VERSION(1, 9, 0) /* add default_with_oids
89  * tracking */
90 #define K_VERS_1_10 MAKE_ARCHIVE_VERSION(1, 10, 0) /* add tablespace */
91 #define K_VERS_1_11 MAKE_ARCHIVE_VERSION(1, 11, 0) /* add toc section
92  * indicator */
93 #define K_VERS_1_12 MAKE_ARCHIVE_VERSION(1, 12, 0) /* add separate BLOB
94  * entries */
95 
96 /* Current archive version number (the format we can output) */
97 #define K_VERS_MAJOR 1
98 #define K_VERS_MINOR 12
99 #define K_VERS_REV 0
100 #define K_VERS_SELF MAKE_ARCHIVE_VERSION(K_VERS_MAJOR, K_VERS_MINOR, K_VERS_REV);
101 
102 /* Newest format we can read */
103 #define K_VERS_MAX MAKE_ARCHIVE_VERSION(K_VERS_MAJOR, K_VERS_MINOR, 255)
104 
105 
106 /* Flags to indicate disposition of offsets stored in files */
107 #define K_OFFSET_POS_NOT_SET 1
108 #define K_OFFSET_POS_SET 2
109 #define K_OFFSET_NO_DATA 3
110 
111 /*
112  * Special exit values from worker children. We reserve 0 for normal
113  * success; 1 and other small values should be interpreted as crashes.
114  */
115 #define WORKER_OK 0
116 #define WORKER_CREATE_DONE 10
117 #define WORKER_INHIBIT_DATA 11
118 #define WORKER_IGNORED_ERRORS 12
119 
121 typedef struct _tocEntry TocEntry;
122 struct ParallelState;
123 
124 #define READ_ERROR_EXIT(fd) \
125  do { \
126  if (feof(fd)) \
127  exit_horribly(modulename, \
128  "could not read from input file: end of file\n"); \
129  else \
130  exit_horribly(modulename, \
131  "could not read from input file: %s\n", strerror(errno)); \
132  } while (0)
133 
134 #define WRITE_ERROR_EXIT \
135  do { \
136  exit_horribly(modulename, "could not write to output file: %s\n", \
137  strerror(errno)); \
138  } while (0)
139 
140 typedef enum T_Action
141 {
144 } T_Action;
145 
146 typedef void (*ClosePtr) (ArchiveHandle *AH);
147 typedef void (*ReopenPtr) (ArchiveHandle *AH);
148 typedef void (*ArchiveEntryPtr) (ArchiveHandle *AH, TocEntry *te);
149 
150 typedef void (*StartDataPtr) (ArchiveHandle *AH, TocEntry *te);
151 typedef void (*WriteDataPtr) (ArchiveHandle *AH, const void *data, size_t dLen);
152 typedef void (*EndDataPtr) (ArchiveHandle *AH, TocEntry *te);
153 
154 typedef void (*StartBlobsPtr) (ArchiveHandle *AH, TocEntry *te);
155 typedef void (*StartBlobPtr) (ArchiveHandle *AH, TocEntry *te, Oid oid);
156 typedef void (*EndBlobPtr) (ArchiveHandle *AH, TocEntry *te, Oid oid);
157 typedef void (*EndBlobsPtr) (ArchiveHandle *AH, TocEntry *te);
158 
159 typedef int (*WriteBytePtr) (ArchiveHandle *AH, const int i);
160 typedef int (*ReadBytePtr) (ArchiveHandle *AH);
161 typedef void (*WriteBufPtr) (ArchiveHandle *AH, const void *c, size_t len);
162 typedef void (*ReadBufPtr) (ArchiveHandle *AH, void *buf, size_t len);
163 typedef void (*SaveArchivePtr) (ArchiveHandle *AH);
164 typedef void (*WriteExtraTocPtr) (ArchiveHandle *AH, TocEntry *te);
165 typedef void (*ReadExtraTocPtr) (ArchiveHandle *AH, TocEntry *te);
166 typedef void (*PrintExtraTocPtr) (ArchiveHandle *AH, TocEntry *te);
167 typedef void (*PrintTocDataPtr) (ArchiveHandle *AH, TocEntry *te);
168 
169 typedef void (*ClonePtr) (ArchiveHandle *AH);
170 typedef void (*DeClonePtr) (ArchiveHandle *AH);
171 
172 typedef int (*WorkerJobDumpPtr) (ArchiveHandle *AH, TocEntry *te);
174 
175 typedef size_t (*CustomOutPtr) (ArchiveHandle *AH, const void *buf, size_t len);
176 
177 typedef enum
178 {
179  SQL_SCAN = 0, /* normal */
180  SQL_IN_SINGLE_QUOTE, /* '...' literal */
181  SQL_IN_DOUBLE_QUOTE /* "..." identifier */
182 } sqlparseState;
183 
184 typedef struct
185 {
186  sqlparseState state; /* see above */
187  bool backSlash; /* next char is backslash quoted? */
188  PQExpBuffer curCmd; /* incomplete line (NULL if not created) */
189 } sqlparseInfo;
190 
191 typedef enum
192 {
197 } ArchiverStage;
198 
199 typedef enum
200 {
201  OUTPUT_SQLCMDS = 0, /* emitting general SQL commands */
202  OUTPUT_COPYDATA, /* writing COPY data */
203  OUTPUT_OTHERDATA /* writing data as INSERT commands */
205 
206 typedef enum
207 {
208  REQ_SCHEMA = 0x01, /* want schema */
209  REQ_DATA = 0x02, /* want data */
210  REQ_SPECIAL = 0x04 /* for special TOC entries */
211 } teReqs;
212 
214 {
215  Archive public; /* Public part of archive */
216  int version; /* Version of file */
217 
218  char *archiveRemoteVersion; /* When reading an archive, the
219  * version of the dumped DB */
220  char *archiveDumpVersion; /* When reading an archive, the
221  * version of the dumper */
222 
223  int debugLevel; /* Used for logging (currently only by
224  * --verbose) */
225  size_t intSize; /* Size of an integer in the archive */
226  size_t offSize; /* Size of a file offset in the archive -
227  * Added V1.7 */
228  ArchiveFormat format; /* Archive format */
229 
230  sqlparseInfo sqlparse; /* state for parsing INSERT data */
231 
232  time_t createDate; /* Date archive created */
233 
234  /*
235  * Fields used when discovering header. A format can always get the
236  * previous read bytes from here...
237  */
238  int readHeader; /* Used if file header has been read already */
239  char *lookahead; /* Buffer used when reading header to discover
240  * format */
241  size_t lookaheadSize; /* Size of allocated buffer */
242  size_t lookaheadLen; /* Length of data in lookahead */
243  pgoff_t lookaheadPos; /* Current read position in lookahead buffer */
244 
245  ArchiveEntryPtr ArchiveEntryPtr; /* Called for each metadata object */
246  StartDataPtr StartDataPtr; /* Called when table data is about to be
247  * dumped */
248  WriteDataPtr WriteDataPtr; /* Called to send some table data to the
249  * archive */
250  EndDataPtr EndDataPtr; /* Called when table data dump is finished */
251  WriteBytePtr WriteBytePtr; /* Write a byte to output */
252  ReadBytePtr ReadBytePtr; /* Read a byte from an archive */
253  WriteBufPtr WriteBufPtr; /* Write a buffer of output to the archive */
254  ReadBufPtr ReadBufPtr; /* Read a buffer of input from the archive */
255  ClosePtr ClosePtr; /* Close the archive */
256  ReopenPtr ReopenPtr; /* Reopen the archive */
257  WriteExtraTocPtr WriteExtraTocPtr; /* Write extra TOC entry data
258  * associated with the current archive
259  * format */
260  ReadExtraTocPtr ReadExtraTocPtr; /* Read extr info associated with
261  * archie format */
262  PrintExtraTocPtr PrintExtraTocPtr; /* Extra TOC info for format */
264 
269 
273 
274  ClonePtr ClonePtr; /* Clone format-specific fields */
275  DeClonePtr DeClonePtr; /* Clean up cloned fields */
276 
277  CustomOutPtr CustomOutPtr; /* Alternative script output routine */
278 
279  /* Stuff for direct DB connection */
280  char *archdbname; /* DB name *read* from archive */
282  char *savedPassword; /* password for ropt->username, if known */
283  char *use_role;
285  /* If connCancel isn't NULL, SIGINT handler will send a cancel */
286  PGcancel *volatile connCancel;
287 
288  int connectToDB; /* Flag to indicate if direct DB connection is
289  * required */
290  ArchiverOutput outputKind; /* Flag for what we're currently writing */
291  bool pgCopyIn; /* Currently in libpq 'COPY IN' mode. */
292 
293  int loFd; /* BLOB fd */
294  int writingBlob; /* Flag */
295  int blobCount; /* # of blobs restored */
296 
297  char *fSpec; /* Archive File Spec */
298  FILE *FH; /* General purpose file handle */
299  void *OF;
300  int gzOut; /* Output file */
301 
302  struct _tocEntry *toc; /* Header of circular list of TOC entries */
303  int tocCount; /* Number of TOC entries */
304  DumpId maxDumpId; /* largest DumpId among all TOC entries */
305 
306  /* arrays created after the TOC list is complete: */
307  struct _tocEntry **tocsByDumpId; /* TOCs indexed by dumpId */
308  DumpId *tableDataId; /* TABLE DATA ids, indexed by table dumpId */
309 
310  struct _tocEntry *currToc; /* Used when dumping data */
311  int compression; /* Compression requested on open Possible
312  * values for compression: -1
313  * Z_DEFAULT_COMPRESSION 0 COMPRESSION_NONE
314  * 1-9 levels for gzip compression */
315  ArchiveMode mode; /* File mode - r or w */
316  void *formatData; /* Header data specific to file format */
317 
318  /* these vars track state to avoid sending redundant SET commands */
319  char *currUser; /* current username, or NULL if unknown */
320  char *currSchema; /* current schema, or NULL */
321  char *currTablespace; /* current tablespace, or NULL */
322  bool currWithOids; /* current default_with_oids setting */
323 
324  void *lo_buf;
325  size_t lo_buf_used;
326  size_t lo_buf_size;
327 
333 };
334 
335 struct _tocEntry
336 {
337  struct _tocEntry *prev;
338  struct _tocEntry *next;
342  bool hadDumper; /* Archiver was passed a dumper routine (used
343  * in restore) */
344  char *tag; /* index tag */
345  char *namespace; /* null or empty string if not in a schema */
346  char *tablespace; /* null if not in a tablespace; empty string
347  * means use database default */
348  char *owner;
349  bool withOids; /* Used only by "TABLE" tags */
350  char *desc;
351  char *defn;
352  char *dropStmt;
353  char *copyStmt;
354  DumpId *dependencies; /* dumpIds of objects this one depends on */
355  int nDeps; /* number of dependencies */
356 
357  DataDumperPtr dataDumper; /* Routine to dump data for object */
358  void *dataDumperArg; /* Arg for above routine */
359  void *formatData; /* TOC Entry data specific to file format */
360 
361  /* working state while dumping/restoring */
362  teReqs reqs; /* do we need schema and/or data of object */
363  bool created; /* set for DATA member if TABLE was created */
364 
365  /* working state (needed only for parallel restore) */
366  struct _tocEntry *par_prev; /* list links for pending/ready items; */
367  struct _tocEntry *par_next; /* these are NULL if not in either list */
368  int depCount; /* number of dependencies not yet restored */
369  DumpId *revDeps; /* dumpIds of objects depending on this one */
370  int nRevDeps; /* number of such dependencies */
371  DumpId *lockDeps; /* dumpIds of objects this one needs lock on */
372  int nLockDeps; /* number of such dependencies */
373 };
374 
375 extern int parallel_restore(ArchiveHandle *AH, TocEntry *te);
376 extern void on_exit_close_archive(Archive *AHX);
377 
378 extern void warn_or_exit_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) pg_attribute_printf(3, 4);
379 
380 extern void WriteTOC(ArchiveHandle *AH);
381 extern void ReadTOC(ArchiveHandle *AH);
382 extern void WriteHead(ArchiveHandle *AH);
383 extern void ReadHead(ArchiveHandle *AH);
384 extern void WriteToc(ArchiveHandle *AH);
385 extern void ReadToc(ArchiveHandle *AH);
386 extern void WriteDataChunks(ArchiveHandle *AH, struct ParallelState *pstate);
389 extern void DeCloneArchive(ArchiveHandle *AH);
390 
391 extern teReqs TocIDRequired(ArchiveHandle *AH, DumpId id);
393 extern bool checkSeek(FILE *fp);
394 
395 #define appendStringLiteralAHX(buf,str,AH) \
396  appendStringLiteral(buf, str, (AH)->public.encoding, (AH)->public.std_strings)
397 
398 #define appendByteaLiteralAHX(buf,str,len,AH) \
399  appendByteaLiteral(buf, str, len, (AH)->public.std_strings)
400 
401 /*
402  * Mandatory routines for each supported format
403  */
404 
405 extern size_t WriteInt(ArchiveHandle *AH, int i);
406 extern int ReadInt(ArchiveHandle *AH);
407 extern char *ReadStr(ArchiveHandle *AH);
408 extern size_t WriteStr(ArchiveHandle *AH, const char *s);
409 
411 size_t WriteOffset(ArchiveHandle *, pgoff_t, int);
412 
413 extern void StartRestoreBlobs(ArchiveHandle *AH);
414 extern void StartRestoreBlob(ArchiveHandle *AH, Oid oid, bool drop);
415 extern void EndRestoreBlob(ArchiveHandle *AH, Oid oid);
416 extern void EndRestoreBlobs(ArchiveHandle *AH);
417 
418 extern void InitArchiveFmt_Custom(ArchiveHandle *AH);
419 extern void InitArchiveFmt_Null(ArchiveHandle *AH);
420 extern void InitArchiveFmt_Directory(ArchiveHandle *AH);
421 extern void InitArchiveFmt_Tar(ArchiveHandle *AH);
422 
423 extern bool isValidTarHeader(char *header);
424 
425 extern int ReconnectToServer(ArchiveHandle *AH, const char *dbname, const char *newUser);
426 extern void DropBlobIfExists(ArchiveHandle *AH, Oid oid);
427 
428 void ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH);
429 int ahprintf(ArchiveHandle *AH, const char *fmt,...) pg_attribute_printf(2, 3);
430 
431 void ahlog(ArchiveHandle *AH, int level, const char *fmt,...) pg_attribute_printf(3, 4);
432 
433 #endif
struct _tocEntry * next
void(* EndBlobPtr)(ArchiveHandle *AH, TocEntry *te, Oid oid)
void ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
PQExpBuffer curCmd
StartBlobsPtr StartBlobsPtr
int DumpId
Definition: pg_backup.h:228
sqlparseState state
struct _tocEntry * currentTE
void(* SaveArchivePtr)(ArchiveHandle *AH)
static const char * modulename
Definition: compress_io.c:78
int ReconnectToServer(ArchiveHandle *AH, const char *dbname, const char *newUser)
Definition: pg_backup_db.c:88
void DropBlobIfExists(ArchiveHandle *AH, Oid oid)
Definition: pg_backup_db.c:674
int void ahlog(ArchiveHandle *AH, int level, const char *fmt,...) pg_attribute_printf(3
int ReadInt(ArchiveHandle *AH)
CatalogId catalogId
PrintTocDataPtr PrintTocDataPtr
void(* ClonePtr)(ArchiveHandle *AH)
void * dataDumperArg
size_t WriteInt(ArchiveHandle *AH, int i)
void on_exit_close_archive(Archive *AHX)
Definition: parallel.c:347
int parallel_restore(ArchiveHandle *AH, TocEntry *te)
int(* DataDumperPtr)(Archive *AH, void *userArg)
Definition: pg_backup.h:230
WorkerJobDumpPtr WorkerJobDumpPtr
WriteBufPtr WriteBufPtr
WriteExtraTocPtr WriteExtraTocPtr
void(* PrintExtraTocPtr)(ArchiveHandle *AH, TocEntry *te)
void InitArchiveFmt_Tar(ArchiveHandle *AH)
DataDumperPtr dataDumper
SetupWorkerPtr SetupWorkerPtr
PGcancel *volatile connCancel
unsigned int Oid
Definition: postgres_ext.h:31
void ReadHead(ArchiveHandle *AH)
void(* ReadBufPtr)(ArchiveHandle *AH, void *buf, size_t len)
size_t(* CustomOutPtr)(ArchiveHandle *AH, const void *buf, size_t len)
bool isValidTarHeader(char *header)
DumpId * lockDeps
bool checkSeek(FILE *fp)
void DeCloneArchive(ArchiveHandle *AH)
struct _tocEntry * currToc
sqlparseState
#define pg_attribute_printf(f, a)
Definition: c.h:634
teSection section
void EndRestoreBlobs(ArchiveHandle *AH)
void(* DeClonePtr)(ArchiveHandle *AH)
void(* WriteBufPtr)(ArchiveHandle *AH, const void *c, size_t len)
void(* EndDataPtr)(ArchiveHandle *AH, TocEntry *te)
void(* PrintTocDataPtr)(ArchiveHandle *AH, TocEntry *te)
void WriteDataChunksForTocEntry(ArchiveHandle *AH, TocEntry *te)
PrintExtraTocPtr PrintExtraTocPtr
void EndRestoreBlob(ArchiveHandle *AH, Oid oid)
int ahprintf(ArchiveHandle *AH, const char *fmt,...) pg_attribute_printf(2
WriteBytePtr WriteBytePtr
char * c
struct _tocEntry * toc
static char * buf
Definition: pg_test_fsync.c:65
DumpId * dependencies
WorkerJobRestorePtr WorkerJobRestorePtr
ArchiveEntryPtr ArchiveEntryPtr
ReadBytePtr ReadBytePtr
struct _tocEntry * par_prev
void(* ArchiveEntryPtr)(ArchiveHandle *AH, TocEntry *te)
z_stream * z_streamp
sqlparseInfo sqlparse
void(* WriteExtraTocPtr)(ArchiveHandle *AH, TocEntry *te)
void WriteDataChunks(ArchiveHandle *AH, struct ParallelState *pstate)
int(* WorkerJobRestorePtr)(ArchiveHandle *AH, TocEntry *te)
struct _tocEntry * par_next
trivalue
Definition: vacuumlo.c:31
void ReadTOC(ArchiveHandle *AH)
struct _tocEntry * prev
TocEntry * getTocEntryByDumpId(ArchiveHandle *AH, DumpId id)
#define pgoff_t
Definition: win32.h:241
ArchiveFormat format
size_t WriteOffset(ArchiveHandle *, pgoff_t, int)
int(* ReadBytePtr)(ArchiveHandle *AH)
ArchiverStage stage
CustomOutPtr CustomOutPtr
void(* WriteDataPtr)(ArchiveHandle *AH, const void *data, size_t dLen)
size_t WriteStr(ArchiveHandle *AH, const char *s)
ArchiverStage
void StartRestoreBlob(ArchiveHandle *AH, Oid oid, bool drop)
void InitArchiveFmt_Directory(ArchiveHandle *AH)
enum _archiveFormat ArchiveFormat
int ReadOffset(ArchiveHandle *, pgoff_t *)
void(* ReopenPtr)(ArchiveHandle *AH)
void InitArchiveFmt_Null(ArchiveHandle *AH)
void warn_or_exit_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) pg_attribute_printf(3
void(* EndBlobsPtr)(ArchiveHandle *AH, TocEntry *te)
enum _teSection teSection
void InitArchiveFmt_Custom(ArchiveHandle *AH)
void StartRestoreBlobs(ArchiveHandle *AH)
void void WriteTOC(ArchiveHandle *AH)
ArchiveHandle * CloneArchive(ArchiveHandle *AH)
TocEntry ** te
Definition: parallel.h:44
ArchiveMode
Definition: xlog.h:115
char * dbname
Definition: streamutil.c:41
WriteDataPtr WriteDataPtr
DumpId * revDeps
void(* StartDataPtr)(ArchiveHandle *AH, TocEntry *te)
ArchiverOutput outputKind
static void header(const char *fmt,...) pg_attribute_printf(1
Definition: pg_regress.c:205
struct _tocEntry ** tocsByDumpId
StartDataPtr StartDataPtr
EndBlobsPtr EndBlobsPtr
void WriteToc(ArchiveHandle *AH)
int(* WorkerJobDumpPtr)(ArchiveHandle *AH, TocEntry *te)
ArchiverOutput
char * ReadStr(ArchiveHandle *AH)
int i
teReqs TocIDRequired(ArchiveHandle *AH, DumpId id)
ArchiverStage lastErrorStage
struct _z_stream z_stream
struct _tocEntry * lastErrorTE
int(* WriteBytePtr)(ArchiveHandle *AH, const int i)
void(* StartBlobPtr)(ArchiveHandle *AH, TocEntry *te, Oid oid)
ReadExtraTocPtr ReadExtraTocPtr
void WriteHead(ArchiveHandle *AH)
void(* StartBlobsPtr)(ArchiveHandle *AH, TocEntry *te)
void ReadToc(ArchiveHandle *AH)
void(* ClosePtr)(ArchiveHandle *AH)
StartBlobPtr StartBlobPtr
void(* ReadExtraTocPtr)(ArchiveHandle *AH, TocEntry *te)