PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pg_backup_db.c
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * pg_backup_db.c
4 *
5 * Implements the basic DB functions used by the archiver.
6 *
7 * IDENTIFICATION
8 * src/bin/pg_dump/pg_backup_db.c
9 *
10 *-------------------------------------------------------------------------
11 */
12#include "postgres_fe.h"
13
14#include <unistd.h>
15#include <ctype.h>
16#ifdef HAVE_TERMIOS_H
17#include <termios.h>
18#endif
19
20#include "common/connect.h"
21#include "common/string.h"
22#include "connectdb.h"
23#include "parallel.h"
24#include "pg_backup_archiver.h"
25#include "pg_backup_db.h"
26#include "pg_backup_utils.h"
27
29static void notice_processor(void *arg, const char *message);
30
31static void
33{
34 const char *remoteversion_str;
35 int remoteversion;
36 PGresult *res;
37
38 remoteversion_str = PQparameterStatus(AH->connection, "server_version");
39 remoteversion = PQserverVersion(AH->connection);
40 if (remoteversion == 0 || !remoteversion_str)
41 pg_fatal("could not get \"server_version\" from libpq");
42
43 AH->public.remoteVersionStr = pg_strdup(remoteversion_str);
44 AH->public.remoteVersion = remoteversion;
45 if (!AH->archiveRemoteVersion)
47
48 if (remoteversion != PG_VERSION_NUM
49 && (remoteversion < AH->public.minRemoteVersion ||
50 remoteversion > AH->public.maxRemoteVersion))
51 {
52 pg_log_error("aborting because of server version mismatch");
53 pg_log_error_detail("server version: %s; %s version: %s",
54 remoteversion_str, progname, PG_VERSION);
55 exit(1);
56 }
57
58 /*
59 * Check if server is in recovery mode, which means we are on a hot
60 * standby.
61 */
63 "SELECT pg_catalog.pg_is_in_recovery()");
64 AH->public.isStandby = (strcmp(PQgetvalue(res, 0, 0), "t") == 0);
65 PQclear(res);
66}
67
68/*
69 * Reconnect to the server. If dbname is not NULL, use that database,
70 * else the one associated with the archive handle.
71 */
72void
74{
75 PGconn *oldConn = AH->connection;
76 RestoreOptions *ropt = AH->public.ropt;
77
78 /*
79 * Save the dbname, if given, in override_dbname so that it will also
80 * affect any later reconnection attempt.
81 */
82 if (dbname)
84
85 /*
86 * Note: we want to establish the new connection, and in particular update
87 * ArchiveHandle's connCancel, before closing old connection. Otherwise
88 * an ill-timed SIGINT could try to access a dead connection.
89 */
90 AH->connection = NULL; /* dodge error check in ConnectDatabaseAhx */
91
92 ConnectDatabaseAhx((Archive *) AH, &ropt->cparams, true);
93
94 PQfinish(oldConn);
95}
96
97/*
98 * Make, or remake, a database connection with the given parameters.
99 *
100 * The resulting connection handle is stored in AHX->connection.
101 *
102 * An interactive password prompt is automatically issued if required.
103 * We store the results of that in AHX->savedPassword.
104 * Note: it's not really all that sensible to use a single-entry password
105 * cache if the username keeps changing. In current usage, however, the
106 * username never does change, so one savedPassword is sufficient.
107 */
108void
110 const ConnParams *cparams,
111 bool isReconnect)
112{
113 ArchiveHandle *AH = (ArchiveHandle *) AHX;
114 trivalue prompt_password;
115 char *password;
116
117 if (AH->connection)
118 pg_fatal("already connected to a database");
119
120 /* Never prompt for a password during a reconnection */
121 prompt_password = isReconnect ? TRI_NO : cparams->promptPassword;
122
124
125 if (prompt_password == TRI_YES && password == NULL)
126 password = simple_prompt("Password: ", false);
127
128 AH->connection = ConnectDatabase(cparams->dbname, NULL, cparams->pghost,
129 cparams->pgport, cparams->username,
130 prompt_password, true,
131 progname, NULL, NULL, password, cparams->override_dbname);
132
133 /* Start strict; later phases may override this. */
136
137 if (password && password != AH->savedPassword)
138 free(password);
139
140 /*
141 * We want to remember connection's actual password, whether or not we got
142 * it by prompting. So we don't just store the password variable.
143 */
145 {
146 free(AH->savedPassword);
148 }
149
150 /* check for version mismatch */
152
154
155 /* arrange for SIGINT to issue a query cancel on this connection */
157}
158
159/*
160 * Close the connection to the database and also cancel off the query if we
161 * have one running.
162 */
163void
165{
166 ArchiveHandle *AH = (ArchiveHandle *) AHX;
167 char errbuf[1];
168
169 if (!AH->connection)
170 return;
171
172 if (AH->connCancel)
173 {
174 /*
175 * If we have an active query, send a cancel before closing, ignoring
176 * any errors. This is of no use for a normal exit, but might be
177 * helpful during pg_fatal().
178 */
180 (void) PQcancel(AH->connCancel, errbuf, sizeof(errbuf));
181
182 /*
183 * Prevent signal handler from sending a cancel after this.
184 */
185 set_archive_cancel_info(AH, NULL);
186 }
187
188 PQfinish(AH->connection);
189 AH->connection = NULL;
190}
191
192PGconn *
194{
195 ArchiveHandle *AH = (ArchiveHandle *) AHX;
196
197 return AH->connection;
198}
199
200static void
201notice_processor(void *arg, const char *message)
202{
203 pg_log_info("%s", message);
204}
205
206/* Like pg_fatal(), but with a complaint about a particular query. */
207static void
208die_on_query_failure(ArchiveHandle *AH, const char *query)
209{
210 pg_log_error("query failed: %s",
212 pg_log_error_detail("Query was: %s", query);
213 exit(1);
214}
215
216void
217ExecuteSqlStatement(Archive *AHX, const char *query)
218{
219 ArchiveHandle *AH = (ArchiveHandle *) AHX;
220 PGresult *res;
221
222 res = PQexec(AH->connection, query);
224 die_on_query_failure(AH, query);
225 PQclear(res);
226}
227
228PGresult *
229ExecuteSqlQuery(Archive *AHX, const char *query, ExecStatusType status)
230{
231 ArchiveHandle *AH = (ArchiveHandle *) AHX;
232 PGresult *res;
233
234 res = PQexec(AH->connection, query);
235 if (PQresultStatus(res) != status)
236 die_on_query_failure(AH, query);
237 return res;
238}
239
240/*
241 * Execute an SQL query and verify that we got exactly one row back.
242 */
243PGresult *
244ExecuteSqlQueryForSingleRow(Archive *fout, const char *query)
245{
246 PGresult *res;
247 int ntups;
248
249 res = ExecuteSqlQuery(fout, query, PGRES_TUPLES_OK);
250
251 /* Expecting a single result only */
252 ntups = PQntuples(res);
253 if (ntups != 1)
254 pg_fatal(ngettext("query returned %d row instead of one: %s",
255 "query returned %d rows instead of one: %s",
256 ntups),
257 ntups, query);
258
259 return res;
260}
261
262/*
263 * Convenience function to send a query.
264 * Monitors result to detect COPY statements
265 */
266static void
267ExecuteSqlCommand(ArchiveHandle *AH, const char *qry, const char *desc)
268{
269 PGconn *conn = AH->connection;
270 PGresult *res;
271
272#ifdef NOT_USED
273 fprintf(stderr, "Executing: '%s'\n\n", qry);
274#endif
275 res = PQexec(conn, qry);
276
277 switch (PQresultStatus(res))
278 {
279 case PGRES_COMMAND_OK:
280 case PGRES_TUPLES_OK:
282 /* A-OK */
283 break;
284 case PGRES_COPY_IN:
285 /* Assume this is an expected result */
286 AH->pgCopyIn = true;
287 break;
288 default:
289 /* trouble */
290 warn_or_exit_horribly(AH, "%s: %sCommand was: %s",
291 desc, PQerrorMessage(conn), qry);
292 break;
293 }
294
295 PQclear(res);
296}
297
298
299/*
300 * Process non-COPY table data (that is, INSERT commands).
301 *
302 * The commands have been run together as one long string for compressibility,
303 * and we are receiving them in bufferloads with arbitrary boundaries, so we
304 * have to locate command boundaries and save partial commands across calls.
305 * All state must be kept in AH->sqlparse, not in local variables of this
306 * routine. We assume that AH->sqlparse was filled with zeroes when created.
307 *
308 * We have to lex the data to the extent of identifying literals and quoted
309 * identifiers, so that we can recognize statement-terminating semicolons.
310 * We assume that INSERT data will not contain SQL comments, E'' literals,
311 * or dollar-quoted strings, so this is much simpler than a full SQL lexer.
312 *
313 * Note: when restoring from a pre-9.0 dump file, this code is also used to
314 * process BLOB COMMENTS data, which has the same problem of containing
315 * multiple SQL commands that might be split across bufferloads. Fortunately,
316 * that data won't contain anything complicated to lex either.
317 */
318static void
319ExecuteSimpleCommands(ArchiveHandle *AH, const char *buf, size_t bufLen)
320{
321 const char *qry = buf;
322 const char *eos = buf + bufLen;
323
324 /* initialize command buffer if first time through */
325 if (AH->sqlparse.curCmd == NULL)
327
328 for (; qry < eos; qry++)
329 {
330 char ch = *qry;
331
332 /* For neatness, we skip any newlines between commands */
333 if (!(ch == '\n' && AH->sqlparse.curCmd->len == 0))
335
336 switch (AH->sqlparse.state)
337 {
338 case SQL_SCAN: /* Default state == 0, set in _allocAH */
339 if (ch == ';')
340 {
341 /*
342 * We've found the end of a statement. Send it and reset
343 * the buffer.
344 */
346 "could not execute query");
348 }
349 else if (ch == '\'')
350 {
352 AH->sqlparse.backSlash = false;
353 }
354 else if (ch == '"')
355 {
357 }
358 break;
359
361 /* We needn't handle '' specially */
362 if (ch == '\'' && !AH->sqlparse.backSlash)
363 AH->sqlparse.state = SQL_SCAN;
364 else if (ch == '\\' && !AH->public.std_strings)
366 else
367 AH->sqlparse.backSlash = false;
368 break;
369
371 /* We needn't handle "" specially */
372 if (ch == '"')
373 AH->sqlparse.state = SQL_SCAN;
374 break;
375 }
376 }
377}
378
379
380/*
381 * Implement ahwrite() for direct-to-DB restore
382 */
383int
384ExecuteSqlCommandBuf(Archive *AHX, const char *buf, size_t bufLen)
385{
386 ArchiveHandle *AH = (ArchiveHandle *) AHX;
387
388 if (AH->outputKind == OUTPUT_COPYDATA)
389 {
390 /*
391 * COPY data.
392 *
393 * We drop the data on the floor if libpq has failed to enter COPY
394 * mode; this allows us to behave reasonably when trying to continue
395 * after an error in a COPY command.
396 */
397 if (AH->pgCopyIn &&
398 PQputCopyData(AH->connection, buf, bufLen) <= 0)
399 pg_fatal("error returned by PQputCopyData: %s",
401 }
402 else if (AH->outputKind == OUTPUT_OTHERDATA)
403 {
404 /*
405 * Table data expressed as INSERT commands; or, in old dump files,
406 * BLOB COMMENTS data (which is expressed as COMMENT ON commands).
407 */
408 ExecuteSimpleCommands(AH, buf, bufLen);
409 }
410 else
411 {
412 /*
413 * General SQL commands; we assume that commands will not be split
414 * across calls.
415 *
416 * In most cases the data passed to us will be a null-terminated
417 * string, but if it's not, we have to add a trailing null.
418 */
419 if (buf[bufLen] == '\0')
420 ExecuteSqlCommand(AH, buf, "could not execute query");
421 else
422 {
423 char *str = (char *) pg_malloc(bufLen + 1);
424
425 memcpy(str, buf, bufLen);
426 str[bufLen] = '\0';
427 ExecuteSqlCommand(AH, str, "could not execute query");
428 free(str);
429 }
430 }
431
432 return bufLen;
433}
434
435/*
436 * Terminate a COPY operation during direct-to-DB restore
437 */
438void
439EndDBCopyMode(Archive *AHX, const char *tocEntryTag)
440{
441 ArchiveHandle *AH = (ArchiveHandle *) AHX;
442
443 if (AH->pgCopyIn)
444 {
445 PGresult *res;
446
447 if (PQputCopyEnd(AH->connection, NULL) <= 0)
448 pg_fatal("error returned by PQputCopyEnd: %s",
450
451 /* Check command status and return to normal libpq state */
452 res = PQgetResult(AH->connection);
454 warn_or_exit_horribly(AH, "COPY failed for table \"%s\": %s",
455 tocEntryTag, PQerrorMessage(AH->connection));
456 PQclear(res);
457
458 /* Do this to ensure we've pumped libpq back to idle state */
459 if (PQgetResult(AH->connection) != NULL)
460 pg_log_warning("unexpected extra results during COPY of table \"%s\"",
461 tocEntryTag);
462
463 AH->pgCopyIn = false;
464 }
465}
466
467void
469{
470 ArchiveHandle *AH = (ArchiveHandle *) AHX;
471
472 ExecuteSqlCommand(AH, "BEGIN", "could not start database transaction");
473}
474
475void
477{
478 ArchiveHandle *AH = (ArchiveHandle *) AHX;
479
480 ExecuteSqlCommand(AH, "COMMIT", "could not commit database transaction");
481}
482
483/*
484 * Issue per-blob commands for the large object(s) listed in the TocEntry
485 *
486 * The TocEntry's defn string is assumed to consist of large object OIDs,
487 * one per line. Wrap these in the given SQL command fragments and issue
488 * the commands. (cmdEnd need not include a semicolon.)
489 */
490void
492 const char *cmdBegin, const char *cmdEnd)
493{
494 /* Make a writable copy of the command string */
495 char *buf = pg_strdup(te->defn);
496 RestoreOptions *ropt = AH->public.ropt;
497 char *st;
498 char *en;
499
500 st = buf;
501 while ((en = strchr(st, '\n')) != NULL)
502 {
503 *en++ = '\0';
504 ahprintf(AH, "%s%s%s;\n", cmdBegin, st, cmdEnd);
505
506 /* In --transaction-size mode, count each command as an action */
507 if (ropt && ropt->txn_size > 0)
508 {
509 if (++AH->txnCount >= ropt->txn_size)
510 {
511 if (AH->connection)
512 {
515 }
516 else
517 ahprintf(AH, "COMMIT;\nBEGIN;\n\n");
518 AH->txnCount = 0;
519 }
520 }
521
522 st = en;
523 }
524 ahprintf(AH, "\n");
525 pg_free(buf);
526}
527
528/*
529 * Process a "LARGE OBJECTS" ACL TocEntry.
530 *
531 * To save space in the dump file, the TocEntry contains only one copy
532 * of the required GRANT/REVOKE commands, written to apply to the first
533 * blob in the group (although we do not depend on that detail here).
534 * We must expand the text to generate commands for all the blobs listed
535 * in the associated BLOB METADATA entry.
536 */
537void
539{
540 TocEntry *blobte = getTocEntryByDumpId(AH, te->dependencies[0]);
541 char *buf;
542 char *st;
543 char *st2;
544 char *en;
545 bool inquotes;
546
547 if (!blobte)
548 pg_fatal("could not find entry for ID %d", te->dependencies[0]);
549 Assert(strcmp(blobte->desc, "BLOB METADATA") == 0);
550
551 /* Make a writable copy of the ACL commands string */
552 buf = pg_strdup(te->defn);
553
554 /*
555 * We have to parse out the commands sufficiently to locate the blob OIDs
556 * and find the command-ending semicolons. The commands should not
557 * contain anything hard to parse except for double-quoted role names,
558 * which are easy to ignore. Once we've split apart the first and second
559 * halves of a command, apply IssueCommandPerBlob. (This means the
560 * updates on the blobs are interleaved if there's multiple commands, but
561 * that should cause no trouble.)
562 */
563 inquotes = false;
564 st = en = buf;
565 st2 = NULL;
566 while (*en)
567 {
568 /* Ignore double-quoted material */
569 if (*en == '"')
570 inquotes = !inquotes;
571 if (inquotes)
572 {
573 en++;
574 continue;
575 }
576 /* If we found "LARGE OBJECT", that's the end of the first half */
577 if (strncmp(en, "LARGE OBJECT ", 13) == 0)
578 {
579 /* Terminate the first-half string */
580 en += 13;
581 Assert(isdigit((unsigned char) *en));
582 *en++ = '\0';
583 /* Skip the rest of the blob OID */
584 while (isdigit((unsigned char) *en))
585 en++;
586 /* Second half starts here */
587 Assert(st2 == NULL);
588 st2 = en;
589 }
590 /* If we found semicolon, that's the end of the second half */
591 else if (*en == ';')
592 {
593 /* Terminate the second-half string */
594 *en++ = '\0';
595 Assert(st2 != NULL);
596 /* Issue this command for each blob */
597 IssueCommandPerBlob(AH, blobte, st, st2);
598 /* For neatness, skip whitespace before the next command */
599 while (isspace((unsigned char) *en))
600 en++;
601 /* Reset for new command */
602 st = en;
603 st2 = NULL;
604 }
605 else
606 en++;
607 }
608 pg_free(buf);
609}
610
611void
613{
614 ahprintf(AH,
615 "SELECT pg_catalog.lo_unlink(oid) "
616 "FROM pg_catalog.pg_largeobject_metadata "
617 "WHERE oid = '%u';\n",
618 oid);
619}
void set_archive_cancel_info(ArchiveHandle *AH, PGconn *conn)
Definition: parallel.c:742
#define ngettext(s, p, n)
Definition: c.h:1152
#define ALWAYS_SECURE_SEARCH_PATH_SQL
Definition: connect.h:25
PGconn * ConnectDatabase(const char *dbname, const char *connection_string, const char *pghost, const char *pgport, const char *pguser, trivalue prompt_password, bool fail_on_error, const char *progname, const char **connstr, int *server_version, char *password, char *override_dbname)
Definition: connectdb.c:40
#define fprintf(file, fmt, msg)
Definition: cubescan.l:21
int PQcancel(PGcancel *cancel, char *errbuf, int errbufsize)
Definition: fe-cancel.c:530
int PQserverVersion(const PGconn *conn)
Definition: fe-connect.c:7609
PGTransactionStatusType PQtransactionStatus(const PGconn *conn)
Definition: fe-connect.c:7564
int PQconnectionUsedPassword(const PGconn *conn)
Definition: fe-connect.c:7687
const char * PQparameterStatus(const PGconn *conn, const char *paramName)
Definition: fe-connect.c:7574
char * PQpass(const PGconn *conn)
Definition: fe-connect.c:7471
void PQfinish(PGconn *conn)
Definition: fe-connect.c:5290
PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn, PQnoticeProcessor proc, void *arg)
Definition: fe-connect.c:7800
char * PQerrorMessage(const PGconn *conn)
Definition: fe-connect.c:7619
char * PQgetvalue(const PGresult *res, int tup_num, int field_num)
Definition: fe-exec.c:3876
PGresult * PQgetResult(PGconn *conn)
Definition: fe-exec.c:2062
ExecStatusType PQresultStatus(const PGresult *res)
Definition: fe-exec.c:3411
void PQclear(PGresult *res)
Definition: fe-exec.c:721
int PQputCopyEnd(PGconn *conn, const char *errormsg)
Definition: fe-exec.c:2749
int PQntuples(const PGresult *res)
Definition: fe-exec.c:3481
int PQputCopyData(PGconn *conn, const char *buffer, int nbytes)
Definition: fe-exec.c:2695
PGresult * PQexec(PGconn *conn, const char *query)
Definition: fe-exec.c:2262
void * pg_malloc(size_t size)
Definition: fe_memutils.c:47
char * pg_strdup(const char *in)
Definition: fe_memutils.c:85
void pg_free(void *ptr)
Definition: fe_memutils.c:105
Assert(PointerIsAligned(start, uint64))
const char * str
#define free(a)
Definition: header.h:65
ExecStatusType
Definition: libpq-fe.h:123
@ PGRES_COPY_IN
Definition: libpq-fe.h:132
@ PGRES_COMMAND_OK
Definition: libpq-fe.h:125
@ PGRES_EMPTY_QUERY
Definition: libpq-fe.h:124
@ PGRES_TUPLES_OK
Definition: libpq-fe.h:128
@ PQTRANS_ACTIVE
Definition: libpq-fe.h:148
#define pg_log_error(...)
Definition: logging.h:106
#define pg_log_info(...)
Definition: logging.h:124
#define pg_log_error_detail(...)
Definition: logging.h:109
const char * progname
Definition: main.c:44
void warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt,...)
TocEntry * getTocEntryByDumpId(ArchiveHandle *AH, DumpId id)
int ahprintf(ArchiveHandle *AH, const char *fmt,...)
@ SQL_IN_DOUBLE_QUOTE
@ SQL_IN_SINGLE_QUOTE
@ SQL_SCAN
@ OUTPUT_COPYDATA
@ OUTPUT_OTHERDATA
void ExecuteSqlStatement(Archive *AHX, const char *query)
Definition: pg_backup_db.c:217
PGconn * GetConnection(Archive *AHX)
Definition: pg_backup_db.c:193
void IssueACLPerBlob(ArchiveHandle *AH, TocEntry *te)
Definition: pg_backup_db.c:538
void EndDBCopyMode(Archive *AHX, const char *tocEntryTag)
Definition: pg_backup_db.c:439
static void die_on_query_failure(ArchiveHandle *AH, const char *query)
Definition: pg_backup_db.c:208
PGresult * ExecuteSqlQuery(Archive *AHX, const char *query, ExecStatusType status)
Definition: pg_backup_db.c:229
PGresult * ExecuteSqlQueryForSingleRow(Archive *fout, const char *query)
Definition: pg_backup_db.c:244
static void _check_database_version(ArchiveHandle *AH)
Definition: pg_backup_db.c:32
void DropLOIfExists(ArchiveHandle *AH, Oid oid)
Definition: pg_backup_db.c:612
void ReconnectToServer(ArchiveHandle *AH, const char *dbname)
Definition: pg_backup_db.c:73
void ConnectDatabaseAhx(Archive *AHX, const ConnParams *cparams, bool isReconnect)
Definition: pg_backup_db.c:109
static void ExecuteSimpleCommands(ArchiveHandle *AH, const char *buf, size_t bufLen)
Definition: pg_backup_db.c:319
void StartTransaction(Archive *AHX)
Definition: pg_backup_db.c:468
void IssueCommandPerBlob(ArchiveHandle *AH, TocEntry *te, const char *cmdBegin, const char *cmdEnd)
Definition: pg_backup_db.c:491
int ExecuteSqlCommandBuf(Archive *AHX, const char *buf, size_t bufLen)
Definition: pg_backup_db.c:384
static void ExecuteSqlCommand(ArchiveHandle *AH, const char *qry, const char *desc)
Definition: pg_backup_db.c:267
static void notice_processor(void *arg, const char *message)
Definition: pg_backup_db.c:201
void DisconnectDatabase(Archive *AHX)
Definition: pg_backup_db.c:164
void CommitTransaction(Archive *AHX)
Definition: pg_backup_db.c:476
void * arg
#define pg_fatal(...)
static char * buf
Definition: pg_test_fsync.c:72
#define pg_log_warning(...)
Definition: pgfnames.c:24
unsigned int Oid
Definition: postgres_ext.h:30
PQExpBuffer createPQExpBuffer(void)
Definition: pqexpbuffer.c:72
void resetPQExpBuffer(PQExpBuffer str)
Definition: pqexpbuffer.c:146
void appendPQExpBufferChar(PQExpBuffer str, char ch)
Definition: pqexpbuffer.c:378
char * simple_prompt(const char *prompt, bool echo)
Definition: sprompt.c:38
static char * password
Definition: streamutil.c:51
char * dbname
Definition: streamutil.c:49
PGconn * conn
Definition: streamutil.c:52
int remoteVersion
Definition: pg_backup.h:229
char * remoteVersionStr
Definition: pg_backup.h:228
bool isStandby
Definition: pg_backup.h:230
int maxRemoteVersion
Definition: pg_backup.h:233
bool std_strings
Definition: pg_backup.h:240
RestoreOptions * ropt
Definition: pg_backup.h:225
PGcancel *volatile connCancel
sqlparseInfo sqlparse
ArchiverOutput outputKind
char * override_dbname
Definition: pg_backup.h:93
char * pgport
Definition: pg_backup.h:87
char * pghost
Definition: pg_backup.h:88
trivalue promptPassword
Definition: pg_backup.h:90
char * username
Definition: pg_backup.h:89
char * dbname
Definition: pg_backup.h:86
ConnParams cparams
Definition: pg_backup.h:145
DumpId * dependencies
PQExpBuffer curCmd
sqlparseState state
trivalue
Definition: vacuumlo.c:35
@ TRI_YES
Definition: vacuumlo.c:38
@ TRI_NO
Definition: vacuumlo.c:37