PostgreSQL Source Code  git master
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 its 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 #include <time.h>
28 
29 #include "libpq-fe.h"
30 #include "pg_backup.h"
31 #include "pqexpbuffer.h"
32 
33 #define LOBBUFSIZE 16384
34 
35 /* Data block types */
36 #define BLK_DATA 1
37 #define BLK_BLOBS 3
38 
39 /* Encode version components into a convenient integer <maj><min><rev> */
40 #define MAKE_ARCHIVE_VERSION(major, minor, rev) (((major) * 256 + (minor)) * 256 + (rev))
41 
42 #define ARCHIVE_MAJOR(version) (((version) >> 16) & 255)
43 #define ARCHIVE_MINOR(version) (((version) >> 8) & 255)
44 #define ARCHIVE_REV(version) (((version) ) & 255)
45 
46 /* Historical version numbers (checked in code) */
47 #define K_VERS_1_0 MAKE_ARCHIVE_VERSION(1, 0, 0)
48 #define K_VERS_1_2 MAKE_ARCHIVE_VERSION(1, 2, 0) /* Allow No ZLIB */
49 #define K_VERS_1_3 MAKE_ARCHIVE_VERSION(1, 3, 0) /* BLOBS */
50 #define K_VERS_1_4 MAKE_ARCHIVE_VERSION(1, 4, 0) /* Date & name in header */
51 #define K_VERS_1_5 MAKE_ARCHIVE_VERSION(1, 5, 0) /* Handle dependencies */
52 #define K_VERS_1_6 MAKE_ARCHIVE_VERSION(1, 6, 0) /* Schema field in TOCs */
53 #define K_VERS_1_7 MAKE_ARCHIVE_VERSION(1, 7, 0) /* File Offset size in
54  * header */
55 #define K_VERS_1_8 MAKE_ARCHIVE_VERSION(1, 8, 0) /* change interpretation
56  * of ID numbers and
57  * dependencies */
58 #define K_VERS_1_9 MAKE_ARCHIVE_VERSION(1, 9, 0) /* add default_with_oids
59  * tracking */
60 #define K_VERS_1_10 MAKE_ARCHIVE_VERSION(1, 10, 0) /* add tablespace */
61 #define K_VERS_1_11 MAKE_ARCHIVE_VERSION(1, 11, 0) /* add toc section
62  * indicator */
63 #define K_VERS_1_12 MAKE_ARCHIVE_VERSION(1, 12, 0) /* add separate BLOB
64  * entries */
65 #define K_VERS_1_13 MAKE_ARCHIVE_VERSION(1, 13, 0) /* change search_path
66  * behavior */
67 #define K_VERS_1_14 MAKE_ARCHIVE_VERSION(1, 14, 0) /* add tableam */
68 #define K_VERS_1_15 MAKE_ARCHIVE_VERSION(1, 15, 0) /* add
69  * compression_algorithm
70  * in header */
71 
72 /* Current archive version number (the format we can output) */
73 #define K_VERS_MAJOR 1
74 #define K_VERS_MINOR 15
75 #define K_VERS_REV 0
76 #define K_VERS_SELF MAKE_ARCHIVE_VERSION(K_VERS_MAJOR, K_VERS_MINOR, K_VERS_REV)
77 
78 /* Newest format we can read */
79 #define K_VERS_MAX MAKE_ARCHIVE_VERSION(K_VERS_MAJOR, K_VERS_MINOR, 255)
80 
81 
82 /* Flags to indicate disposition of offsets stored in files */
83 #define K_OFFSET_POS_NOT_SET 1
84 #define K_OFFSET_POS_SET 2
85 #define K_OFFSET_NO_DATA 3
86 
87 /*
88  * Special exit values from worker children. We reserve 0 for normal
89  * success; 1 and other small values should be interpreted as crashes.
90  */
91 #define WORKER_OK 0
92 #define WORKER_CREATE_DONE 10
93 #define WORKER_INHIBIT_DATA 11
94 #define WORKER_IGNORED_ERRORS 12
95 
96 typedef struct _archiveHandle ArchiveHandle;
97 typedef struct _tocEntry TocEntry;
98 struct ParallelState;
99 
100 #define READ_ERROR_EXIT(fd) \
101  do { \
102  if (feof(fd)) \
103  pg_fatal("could not read from input file: end of file"); \
104  else \
105  pg_fatal("could not read from input file: %m"); \
106  } while (0)
107 
108 #define WRITE_ERROR_EXIT \
109  do { \
110  pg_fatal("could not write to output file: %m"); \
111  } while (0)
112 
113 typedef enum T_Action
114 {
117 } T_Action;
118 
119 typedef void (*ClosePtrType) (ArchiveHandle *AH);
120 typedef void (*ReopenPtrType) (ArchiveHandle *AH);
122 
123 typedef void (*StartDataPtrType) (ArchiveHandle *AH, TocEntry *te);
124 typedef void (*WriteDataPtrType) (ArchiveHandle *AH, const void *data, size_t dLen);
125 typedef void (*EndDataPtrType) (ArchiveHandle *AH, TocEntry *te);
126 
127 typedef void (*StartLOsPtrType) (ArchiveHandle *AH, TocEntry *te);
128 typedef void (*StartLOPtrType) (ArchiveHandle *AH, TocEntry *te, Oid oid);
129 typedef void (*EndLOPtrType) (ArchiveHandle *AH, TocEntry *te, Oid oid);
130 typedef void (*EndLOsPtrType) (ArchiveHandle *AH, TocEntry *te);
131 
132 typedef int (*WriteBytePtrType) (ArchiveHandle *AH, const int i);
133 typedef int (*ReadBytePtrType) (ArchiveHandle *AH);
134 typedef void (*WriteBufPtrType) (ArchiveHandle *AH, const void *c, size_t len);
135 typedef void (*ReadBufPtrType) (ArchiveHandle *AH, void *buf, size_t len);
138 typedef void (*PrintExtraTocPtrType) (ArchiveHandle *AH, TocEntry *te);
140 
142 typedef void (*ClonePtrType) (ArchiveHandle *AH);
143 typedef void (*DeClonePtrType) (ArchiveHandle *AH);
144 
146 typedef int (*WorkerJobRestorePtrType) (ArchiveHandle *AH, TocEntry *te);
147 
148 typedef size_t (*CustomOutPtrType) (ArchiveHandle *AH, const void *buf, size_t len);
149 
150 typedef enum
151 {
152  SQL_SCAN = 0, /* normal */
153  SQL_IN_SINGLE_QUOTE, /* '...' literal */
154  SQL_IN_DOUBLE_QUOTE, /* "..." identifier */
156 
157 typedef struct
158 {
159  sqlparseState state; /* see above */
160  bool backSlash; /* next char is backslash quoted? */
161  PQExpBuffer curCmd; /* incomplete line (NULL if not created) */
162 } sqlparseInfo;
163 
164 typedef enum
165 {
170 } ArchiverStage;
171 
172 typedef enum
173 {
174  OUTPUT_SQLCMDS = 0, /* emitting general SQL commands */
175  OUTPUT_COPYDATA, /* writing COPY data */
176  OUTPUT_OTHERDATA, /* writing data as INSERT commands */
178 
179 /*
180  * For historical reasons, ACL items are interspersed with everything else in
181  * a dump file's TOC; typically they're right after the object they're for.
182  * However, we need to restore data before ACLs, as otherwise a read-only
183  * table (ie one where the owner has revoked her own INSERT privilege) causes
184  * data restore failures. On the other hand, matview REFRESH commands should
185  * come out after ACLs, as otherwise non-superuser-owned matviews might not
186  * be able to execute. (If the permissions at the time of dumping would not
187  * allow a REFRESH, too bad; we won't fix that for you.) We also want event
188  * triggers to be restored after ACLs, so that they can't mess those up.
189  *
190  * These considerations force us to make three passes over the TOC,
191  * restoring the appropriate subset of items in each pass. We assume that
192  * the dependency sort resulted in an appropriate ordering of items within
193  * each subset.
194  *
195  * XXX This mechanism should be superseded by tracking dependencies on ACLs
196  * properly; but we'll still need it for old dump files even after that.
197  */
198 typedef enum
199 {
200  RESTORE_PASS_MAIN = 0, /* Main pass (most TOC item types) */
201  RESTORE_PASS_ACL, /* ACL item types */
202  RESTORE_PASS_POST_ACL, /* Event trigger and matview refresh items */
203 
204 #define RESTORE_PASS_LAST RESTORE_PASS_POST_ACL
206 
207 #define REQ_SCHEMA 0x01 /* want schema */
208 #define REQ_DATA 0x02 /* want data */
209 #define REQ_SPECIAL 0x04 /* for special TOC entries */
210 
211 struct _archiveHandle
212 {
213  Archive public; /* Public part of archive */
214  int version; /* Version of file */
215 
216  char *archiveRemoteVersion; /* When reading an archive, the
217  * version of the dumped DB */
218  char *archiveDumpVersion; /* When reading an archive, the version of
219  * the dumper */
220 
221  size_t intSize; /* Size of an integer in the archive */
222  size_t offSize; /* Size of a file offset in the archive -
223  * Added V1.7 */
224  ArchiveFormat format; /* Archive format */
225 
226  sqlparseInfo sqlparse; /* state for parsing INSERT data */
227 
228  time_t createDate; /* Date archive created */
229 
230  /*
231  * Fields used when discovering archive format. For tar format, we load
232  * the first block into the lookahead buffer, and verify that it looks
233  * like a tar header. The tar module must then consume bytes from the
234  * lookahead buffer before reading any more from the file. For custom
235  * format, we load only the "PGDMP" marker into the buffer, and then set
236  * readHeader after confirming it matches. The buffer is vestigial in
237  * this case, as the subsequent code just checks readHeader and doesn't
238  * examine the buffer.
239  */
240  int readHeader; /* Set if we already read "PGDMP" marker */
241  char *lookahead; /* Buffer used when reading header to discover
242  * format */
243  size_t lookaheadSize; /* Allocated size of buffer */
244  size_t lookaheadLen; /* Length of valid data in lookahead */
245  size_t lookaheadPos; /* Current read position in lookahead buffer */
246 
247  ArchiveEntryPtrType ArchiveEntryPtr; /* Called for each metadata object */
248  StartDataPtrType StartDataPtr; /* Called when table data is about to be
249  * dumped */
250  WriteDataPtrType WriteDataPtr; /* Called to send some table data to the
251  * archive */
252  EndDataPtrType EndDataPtr; /* Called when table data dump is finished */
253  WriteBytePtrType WriteBytePtr; /* Write a byte to output */
254  ReadBytePtrType ReadBytePtr; /* Read a byte from an archive */
255  WriteBufPtrType WriteBufPtr; /* Write a buffer of output to the archive */
256  ReadBufPtrType ReadBufPtr; /* Read a buffer of input from the archive */
257  ClosePtrType ClosePtr; /* Close the archive */
258  ReopenPtrType ReopenPtr; /* Reopen the archive */
259  WriteExtraTocPtrType WriteExtraTocPtr; /* Write extra TOC entry data
260  * associated with the current
261  * archive format */
262  ReadExtraTocPtrType ReadExtraTocPtr; /* Read extra info associated with
263  * archive format */
264  PrintExtraTocPtrType PrintExtraTocPtr; /* Extra TOC info for format */
266 
271 
275 
277  ClonePtrType ClonePtr; /* Clone format-specific fields */
278  DeClonePtrType DeClonePtr; /* Clean up cloned fields */
279 
280  CustomOutPtrType CustomOutPtr; /* Alternative script output routine */
281 
282  /* Stuff for direct DB connection */
283  char *archdbname; /* DB name *read* from archive */
284  char *savedPassword; /* password for ropt->username, if known */
285  char *use_role;
287  /* If connCancel isn't NULL, SIGINT handler will send a cancel */
288  PGcancel *volatile connCancel;
289 
290  int connectToDB; /* Flag to indicate if direct DB connection is
291  * required */
292  ArchiverOutput outputKind; /* Flag for what we're currently writing */
293  bool pgCopyIn; /* Currently in libpq 'COPY IN' mode. */
294 
295  int loFd;
296  bool writingLO;
297  int loCount; /* # of LOs restored */
298 
299  char *fSpec; /* Archive File Spec */
300  FILE *FH; /* General purpose file handle */
301  void *OF; /* Output file */
302 
303  struct _tocEntry *toc; /* Header of circular list of TOC entries */
304  int tocCount; /* Number of TOC entries */
305  DumpId maxDumpId; /* largest DumpId among all TOC entries */
306 
307  /* arrays created after the TOC list is complete: */
308  struct _tocEntry **tocsByDumpId; /* TOCs indexed by dumpId */
309  DumpId *tableDataId; /* TABLE DATA ids, indexed by table dumpId */
310 
311  struct _tocEntry *currToc; /* Used when dumping data */
312  pg_compress_specification compression_spec; /* Requested specification for
313  * compression */
314  bool dosync; /* data requested to be synced on sight */
316  ArchiveMode mode; /* File mode - r or w */
317  void *formatData; /* Header data specific to file format */
318 
319  /* these vars track state to avoid sending redundant SET commands */
320  char *currUser; /* current username, or NULL if unknown */
321  char *currSchema; /* current schema, or NULL */
322  char *currTablespace; /* current tablespace, or NULL */
323  char *currTableAm; /* current table access method, or NULL */
324 
325  void *lo_buf;
326  size_t lo_buf_used;
327  size_t lo_buf_size;
328 
329  int noTocComments;
332  RestorePass restorePass; /* used only during parallel restore */
335 };
336 
337 struct _tocEntry
338 {
339  struct _tocEntry *prev;
340  struct _tocEntry *next;
344  bool hadDumper; /* Archiver was passed a dumper routine (used
345  * in restore) */
346  char *tag; /* index tag */
347  char *namespace; /* null or empty string if not in a schema */
348  char *tablespace; /* null if not in a tablespace; empty string
349  * means use database default */
350  char *tableam; /* table access method, only for TABLE tags */
351  char *owner;
352  char *desc;
353  char *defn;
354  char *dropStmt;
355  char *copyStmt;
356  DumpId *dependencies; /* dumpIds of objects this one depends on */
357  int nDeps; /* number of dependencies */
358 
359  DataDumperPtr dataDumper; /* Routine to dump data for object */
360  const void *dataDumperArg; /* Arg for above routine */
361  void *formatData; /* TOC Entry data specific to file format */
362 
363  /* working state while dumping/restoring */
364  pgoff_t dataLength; /* item's data size; 0 if none or unknown */
365  int reqs; /* do we need schema and/or data of object
366  * (REQ_* bit mask) */
367  bool created; /* set for DATA member if TABLE was created */
368 
369  /* working state (needed only for parallel restore) */
370  struct _tocEntry *pending_prev; /* list links for pending-items list; */
371  struct _tocEntry *pending_next; /* NULL if not in that list */
372  int depCount; /* number of dependencies not yet restored */
373  DumpId *revDeps; /* dumpIds of objects depending on this one */
374  int nRevDeps; /* number of such dependencies */
375  DumpId *lockDeps; /* dumpIds of objects this one needs lock on */
376  int nLockDeps; /* number of such dependencies */
377 };
378 
379 extern int parallel_restore(ArchiveHandle *AH, TocEntry *te);
380 extern void on_exit_close_archive(Archive *AHX);
381 
382 extern void warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt,...) pg_attribute_printf(2, 3);
383 
384 /* Options for ArchiveEntry */
385 typedef struct _archiveOpts
386 {
387  const char *tag;
388  const char *namespace;
389  const char *tablespace;
390  const char *tableam;
391  const char *owner;
392  const char *description;
394  const char *createStmt;
395  const char *dropStmt;
396  const char *copyStmt;
397  const DumpId *deps;
398  int nDeps;
399  DataDumperPtr dumpFn;
400  const void *dumpArg;
401 } ArchiveOpts;
402 #define ARCHIVE_OPTS(...) &(ArchiveOpts){__VA_ARGS__}
403 /* Called to add a TOC entry */
406 
407 extern void WriteHead(ArchiveHandle *AH);
408 extern void ReadHead(ArchiveHandle *AH);
409 extern void WriteToc(ArchiveHandle *AH);
410 extern void ReadToc(ArchiveHandle *AH);
411 extern void WriteDataChunks(ArchiveHandle *AH, struct ParallelState *pstate);
414 extern void DeCloneArchive(ArchiveHandle *AH);
415 
416 extern int TocIDRequired(ArchiveHandle *AH, DumpId id);
418 extern bool checkSeek(FILE *fp);
419 
420 #define appendStringLiteralAHX(buf,str,AH) \
421  appendStringLiteral(buf, str, (AH)->public.encoding, (AH)->public.std_strings)
422 
423 #define appendByteaLiteralAHX(buf,str,len,AH) \
424  appendByteaLiteral(buf, str, len, (AH)->public.std_strings)
425 
426 /*
427  * Mandatory routines for each supported format
428  */
429 
430 extern size_t WriteInt(ArchiveHandle *AH, int i);
431 extern int ReadInt(ArchiveHandle *AH);
432 extern char *ReadStr(ArchiveHandle *AH);
433 extern size_t WriteStr(ArchiveHandle *AH, const char *c);
434 
436 size_t WriteOffset(ArchiveHandle *, pgoff_t, int);
437 
438 extern void StartRestoreLOs(ArchiveHandle *AH);
439 extern void StartRestoreLO(ArchiveHandle *AH, Oid oid, bool drop);
440 extern void EndRestoreLO(ArchiveHandle *AH, Oid oid);
441 extern void EndRestoreLOs(ArchiveHandle *AH);
442 
443 extern void InitArchiveFmt_Custom(ArchiveHandle *AH);
444 extern void InitArchiveFmt_Null(ArchiveHandle *AH);
446 extern void InitArchiveFmt_Tar(ArchiveHandle *AH);
447 
448 extern bool isValidTarHeader(char *header);
449 
450 extern void ReconnectToServer(ArchiveHandle *AH, const char *dbname);
451 extern void DropLOIfExists(ArchiveHandle *AH, Oid oid);
452 
453 void ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH);
454 int ahprintf(ArchiveHandle *AH, const char *fmt,...) pg_attribute_printf(2, 3);
455 
456 #endif
#define pg_attribute_printf(f, a)
Definition: c.h:180
DataDirSyncMethod
Definition: file_utils.h:28
int i
Definition: isn.c:73
static void const char * fmt
static AmcheckOptions opts
Definition: pg_amcheck.c:111
int DumpId
Definition: pg_backup.h:268
void(* SetupWorkerPtrType)(Archive *AH)
Definition: pg_backup.h:278
enum _archiveFormat ArchiveFormat
enum _teSection teSection
int(* DataDumperPtr)(Archive *AH, const void *userArg)
Definition: pg_backup.h:276
void DeCloneArchive(ArchiveHandle *AH)
int TocIDRequired(ArchiveHandle *AH, DumpId id)
bool checkSeek(FILE *fp)
void ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
void InitArchiveFmt_Null(ArchiveHandle *AH)
void WriteDataChunksForTocEntry(ArchiveHandle *AH, TocEntry *te)
void(* EndLOPtrType)(ArchiveHandle *AH, TocEntry *te, Oid oid)
void WriteHead(ArchiveHandle *AH)
void(* ReadExtraTocPtrType)(ArchiveHandle *AH, TocEntry *te)
TocEntry * getTocEntryByDumpId(ArchiveHandle *AH, DumpId id)
size_t WriteInt(ArchiveHandle *AH, int i)
void struct _archiveOpts ArchiveOpts
void(* PrintTocDataPtrType)(ArchiveHandle *AH, TocEntry *te)
int(* WorkerJobDumpPtrType)(ArchiveHandle *AH, TocEntry *te)
void(* EndDataPtrType)(ArchiveHandle *AH, TocEntry *te)
void(* StartDataPtrType)(ArchiveHandle *AH, TocEntry *te)
ArchiveHandle * CloneArchive(ArchiveHandle *AH)
int(* WorkerJobRestorePtrType)(ArchiveHandle *AH, TocEntry *te)
void InitArchiveFmt_Custom(ArchiveHandle *AH)
sqlparseState
@ SQL_IN_DOUBLE_QUOTE
@ SQL_IN_SINGLE_QUOTE
@ SQL_SCAN
void InitArchiveFmt_Tar(ArchiveHandle *AH)
size_t WriteOffset(ArchiveHandle *, pgoff_t, int)
void DropLOIfExists(ArchiveHandle *AH, Oid oid)
Definition: pg_backup_db.c:545
void(* DeClonePtrType)(ArchiveHandle *AH)
void StartRestoreLOs(ArchiveHandle *AH)
void ReconnectToServer(ArchiveHandle *AH, const char *dbname)
Definition: pg_backup_db.c:74
int(* WriteBytePtrType)(ArchiveHandle *AH, const int i)
void(* WriteBufPtrType)(ArchiveHandle *AH, const void *c, size_t len)
void(* ClonePtrType)(ArchiveHandle *AH)
int ReadOffset(ArchiveHandle *, pgoff_t *)
void warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt,...) pg_attribute_printf(2
void(* ClosePtrType)(ArchiveHandle *AH)
bool isValidTarHeader(char *header)
void(* PrintExtraTocPtrType)(ArchiveHandle *AH, TocEntry *te)
void(* WriteDataPtrType)(ArchiveHandle *AH, const void *data, size_t dLen)
ArchiverStage
@ STAGE_INITIALIZING
@ STAGE_PROCESSING
@ STAGE_NONE
@ STAGE_FINALIZING
@ ACT_RESTORE
@ ACT_DUMP
char * ReadStr(ArchiveHandle *AH)
void(* EndLOsPtrType)(ArchiveHandle *AH, TocEntry *te)
int ReadInt(ArchiveHandle *AH)
void(* ArchiveEntryPtrType)(ArchiveHandle *AH, TocEntry *te)
void(* WriteExtraTocPtrType)(ArchiveHandle *AH, TocEntry *te)
void on_exit_close_archive(Archive *AHX)
Definition: parallel.c:328
TocEntry * ArchiveEntry(Archive *AHX, CatalogId catalogId, DumpId dumpId, ArchiveOpts *opts)
void WriteDataChunks(ArchiveHandle *AH, struct ParallelState *pstate)
void ReadHead(ArchiveHandle *AH)
void(* StartLOsPtrType)(ArchiveHandle *AH, TocEntry *te)
void ReadToc(ArchiveHandle *AH)
void EndRestoreLO(ArchiveHandle *AH, Oid oid)
ArchiverOutput
@ OUTPUT_COPYDATA
@ OUTPUT_SQLCMDS
@ OUTPUT_OTHERDATA
int ahprintf(ArchiveHandle *AH, const char *fmt,...) pg_attribute_printf(2
int(* ReadBytePtrType)(ArchiveHandle *AH)
size_t(* CustomOutPtrType)(ArchiveHandle *AH, const void *buf, size_t len)
void WriteToc(ArchiveHandle *AH)
void InitArchiveFmt_Directory(ArchiveHandle *AH)
void(* ReadBufPtrType)(ArchiveHandle *AH, void *buf, size_t len)
void(* StartLOPtrType)(ArchiveHandle *AH, TocEntry *te, Oid oid)
void(* ReopenPtrType)(ArchiveHandle *AH)
void EndRestoreLOs(ArchiveHandle *AH)
void StartRestoreLO(ArchiveHandle *AH, Oid oid, bool drop)
@ RESTORE_PASS_POST_ACL
@ RESTORE_PASS_ACL
@ RESTORE_PASS_MAIN
int parallel_restore(ArchiveHandle *AH, TocEntry *te)
void(* PrepParallelRestorePtrType)(ArchiveHandle *AH)
size_t WriteStr(ArchiveHandle *AH, const char *c)
const void size_t len
const void * data
static char * buf
Definition: pg_test_fsync.c:73
char * tablespace
Definition: pgbench.c:216
unsigned int Oid
Definition: postgres_ext.h:31
char * c
char * dbname
Definition: streamutil.c:51
TocEntry ** te
Definition: parallel.h:59
ArchiverStage stage
RestorePass restorePass
ArchiveFormat format
struct _tocEntry * toc
DeClonePtrType DeClonePtr
EndLOsPtrType EndLOsPtr
DataDirSyncMethod sync_method
struct _tocEntry * lastErrorTE
ReadExtraTocPtrType ReadExtraTocPtr
struct _tocEntry * currentTE
CustomOutPtrType CustomOutPtr
WorkerJobDumpPtrType WorkerJobDumpPtr
PGcancel *volatile connCancel
StartLOsPtrType StartLOsPtr
ArchiveEntryPtrType ArchiveEntryPtr
pg_compress_specification compression_spec
WriteDataPtrType WriteDataPtr
StartLOPtrType StartLOPtr
struct _tocEntry ** tocsByDumpId
ClonePtrType ClonePtr
WriteBufPtrType WriteBufPtr
PrepParallelRestorePtrType PrepParallelRestorePtr
EndLOPtrType EndLOPtr
WriteExtraTocPtrType WriteExtraTocPtr
ReadBytePtrType ReadBytePtr
WorkerJobRestorePtrType WorkerJobRestorePtr
PrintTocDataPtrType PrintTocDataPtr
struct _tocEntry * currToc
WriteBytePtrType WriteBytePtr
sqlparseInfo sqlparse
ReadBufPtrType ReadBufPtr
PrintExtraTocPtrType PrintExtraTocPtr
ArchiverStage lastErrorStage
StartDataPtrType StartDataPtr
ReopenPtrType ReopenPtr
ArchiverOutput outputKind
EndDataPtrType EndDataPtr
SetupWorkerPtrType SetupWorkerPtr
ClosePtrType ClosePtr
struct _tocEntry * pending_next
struct _tocEntry * prev
teSection section
struct _tocEntry * pending_prev
DataDumperPtr dataDumper
pgoff_t dataLength
CatalogId catalogId
struct _tocEntry * next
const void * dataDumperArg
DumpId * revDeps
DumpId * dependencies
DumpId * lockDeps
Definition: regguts.h:323
const char * description
#define pgoff_t
Definition: win32_port.h:207
ArchiveMode
Definition: xlog.h:62