PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
streamutil.h File Reference
#include "libpq-fe.h"
#include "access/xlogdefs.h"
Include dependency graph for streamutil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PGconnGetConnection (void)
 
bool CreateReplicationSlot (PGconn *conn, const char *slot_name, const char *plugin, bool is_physical, bool slot_exists_ok)
 
bool DropReplicationSlot (PGconn *conn, const char *slot_name)
 
bool RunIdentifySystem (PGconn *conn, char **sysid, TimeLineID *starttli, XLogRecPtr *startpos, char **db_name)
 
int64 feGetCurrentTimestamp (void)
 
void feTimestampDifference (int64 start_time, int64 stop_time, long *secs, int *microsecs)
 
bool feTimestampDifferenceExceeds (int64 start_time, int64 stop_time, int msec)
 
void fe_sendint64 (int64 i, char *buf)
 
int64 fe_recvint64 (char *buf)
 

Variables

const char * progname
 
char * connection_string
 
char * dbhost
 
char * dbuser
 
char * dbport
 
char * dbname
 
int dbgetpassword
 
PGconnconn
 

Function Documentation

bool CreateReplicationSlot ( PGconn conn,
const char *  slot_name,
const char *  plugin,
bool  is_physical,
bool  slot_exists_ok 
)

Definition at line 331 of file streamutil.c.

References _, appendPQExpBuffer(), Assert, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), ERRCODE_DUPLICATE_OBJECT, NULL, PG_DIAG_SQLSTATE, PGRES_TUPLES_OK, PQclear(), PQerrorMessage(), PQexec(), PQnfields(), PQntuples(), PQresultErrorField(), PQresultStatus(), and progname.

333 {
334  PQExpBuffer query;
335  PGresult *res;
336 
337  query = createPQExpBuffer();
338 
339  Assert((is_physical && plugin == NULL) ||
340  (!is_physical && plugin != NULL));
341  Assert(slot_name != NULL);
342 
343  /* Build query */
344  if (is_physical)
345  appendPQExpBuffer(query, "CREATE_REPLICATION_SLOT \"%s\" PHYSICAL",
346  slot_name);
347  else
348  appendPQExpBuffer(query, "CREATE_REPLICATION_SLOT \"%s\" LOGICAL \"%s\"",
349  slot_name, plugin);
350 
351  res = PQexec(conn, query->data);
352  if (PQresultStatus(res) != PGRES_TUPLES_OK)
353  {
354  const char *sqlstate = PQresultErrorField(res, PG_DIAG_SQLSTATE);
355 
356  if (slot_exists_ok &&
357  sqlstate &&
358  strcmp(sqlstate, ERRCODE_DUPLICATE_OBJECT) == 0)
359  {
360  destroyPQExpBuffer(query);
361  PQclear(res);
362  return true;
363  }
364  else
365  {
366  fprintf(stderr, _("%s: could not send replication command \"%s\": %s"),
367  progname, query->data, PQerrorMessage(conn));
368 
369  destroyPQExpBuffer(query);
370  PQclear(res);
371  return false;
372  }
373  }
374 
375  if (PQntuples(res) != 1 || PQnfields(res) != 4)
376  {
377  fprintf(stderr,
378  _("%s: could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields\n"),
379  progname, slot_name,
380  PQntuples(res), PQnfields(res), 1, 4);
381 
382  destroyPQExpBuffer(query);
383  PQclear(res);
384  return false;
385  }
386 
387  destroyPQExpBuffer(query);
388  PQclear(res);
389  return true;
390 }
static const char * plugin
int PQnfields(const PGresult *res)
Definition: fe-exec.c:2681
char * PQerrorMessage(const PGconn *conn)
Definition: fe-connect.c:5960
int PQntuples(const PGresult *res)
Definition: fe-exec.c:2673
#define PG_DIAG_SQLSTATE
Definition: postgres_ext.h:53
ExecStatusType PQresultStatus(const PGresult *res)
Definition: fe-exec.c:2596
static bool slot_exists_ok
Definition: pg_receivewal.c:42
void destroyPQExpBuffer(PQExpBuffer str)
Definition: pqexpbuffer.c:113
void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
Definition: pqexpbuffer.c:262
PQExpBuffer createPQExpBuffer(void)
Definition: pqexpbuffer.c:71
void PQclear(PGresult *res)
Definition: fe-exec.c:650
const char * progname
Definition: streamutil.c:36
char * PQresultErrorField(const PGresult *res, int fieldcode)
Definition: fe-exec.c:2658
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:670
PGresult * PQexec(PGconn *conn, const char *query)
Definition: fe-exec.c:1846
#define ERRCODE_DUPLICATE_OBJECT
Definition: streamutil.c:34
#define _(x)
Definition: elog.c:84
bool DropReplicationSlot ( PGconn conn,
const char *  slot_name 
)

Definition at line 397 of file streamutil.c.

References _, appendPQExpBuffer(), Assert, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), NULL, PGRES_COMMAND_OK, PQclear(), PQerrorMessage(), PQexec(), PQnfields(), PQntuples(), PQresultStatus(), and progname.

398 {
399  PQExpBuffer query;
400  PGresult *res;
401 
402  Assert(slot_name != NULL);
403 
404  query = createPQExpBuffer();
405 
406  /* Build query */
407  appendPQExpBuffer(query, "DROP_REPLICATION_SLOT \"%s\"",
408  slot_name);
409  res = PQexec(conn, query->data);
410  if (PQresultStatus(res) != PGRES_COMMAND_OK)
411  {
412  fprintf(stderr, _("%s: could not send replication command \"%s\": %s"),
413  progname, query->data, PQerrorMessage(conn));
414 
415  destroyPQExpBuffer(query);
416  PQclear(res);
417  return false;
418  }
419 
420  if (PQntuples(res) != 0 || PQnfields(res) != 0)
421  {
422  fprintf(stderr,
423  _("%s: could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields\n"),
424  progname, slot_name,
425  PQntuples(res), PQnfields(res), 0, 0);
426 
427  destroyPQExpBuffer(query);
428  PQclear(res);
429  return false;
430  }
431 
432  destroyPQExpBuffer(query);
433  PQclear(res);
434  return true;
435 }
int PQnfields(const PGresult *res)
Definition: fe-exec.c:2681
char * PQerrorMessage(const PGconn *conn)
Definition: fe-connect.c:5960
int PQntuples(const PGresult *res)
Definition: fe-exec.c:2673
ExecStatusType PQresultStatus(const PGresult *res)
Definition: fe-exec.c:2596
void destroyPQExpBuffer(PQExpBuffer str)
Definition: pqexpbuffer.c:113
void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
Definition: pqexpbuffer.c:262
PQExpBuffer createPQExpBuffer(void)
Definition: pqexpbuffer.c:71
void PQclear(PGresult *res)
Definition: fe-exec.c:650
const char * progname
Definition: streamutil.c:36
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:670
PGresult * PQexec(PGconn *conn, const char *query)
Definition: fe-exec.c:1846
#define _(x)
Definition: elog.c:84
int64 fe_recvint64 ( char *  buf)

Definition at line 518 of file streamutil.c.

Referenced by ProcessXLogDataMsg(), and StreamLogicalLog().

519 {
520  int64 result;
521  uint32 h32;
522  uint32 l32;
523 
524  memcpy(&h32, buf, 4);
525  memcpy(&l32, buf + 4, 4);
526  h32 = ntohl(h32);
527  l32 = ntohl(l32);
528 
529  result = h32;
530  result <<= 32;
531  result |= l32;
532 
533  return result;
534 }
static char * buf
Definition: pg_test_fsync.c:65
unsigned int uint32
Definition: c.h:265
void fe_sendint64 ( int64  i,
char *  buf 
)

Definition at line 499 of file streamutil.c.

Referenced by sendFeedback().

500 {
501  uint32 n32;
502 
503  /* High order half first, since we're doing MSB-first */
504  n32 = (uint32) (i >> 32);
505  n32 = htonl(n32);
506  memcpy(&buf[0], &n32, 4);
507 
508  /* Now the low order half */
509  n32 = (uint32) i;
510  n32 = htonl(n32);
511  memcpy(&buf[4], &n32, 4);
512 }
static char * buf
Definition: pg_test_fsync.c:65
unsigned int uint32
Definition: c.h:265
int i
int64 feGetCurrentTimestamp ( void  )

Definition at line 444 of file streamutil.c.

References gettimeofday(), NULL, POSTGRES_EPOCH_JDATE, SECS_PER_DAY, UNIX_EPOCH_JDATE, and USECS_PER_SEC.

Referenced by flushAndSendFeedback(), HandleCopyStream(), ProcessKeepaliveMsg(), and StreamLogicalLog().

445 {
446  int64 result;
447  struct timeval tp;
448 
449  gettimeofday(&tp, NULL);
450 
451  result = (int64) tp.tv_sec -
453 
454  result = (result * USECS_PER_SEC) + tp.tv_usec;
455 
456  return result;
457 }
int gettimeofday(struct timeval *tp, struct timezone *tzp)
Definition: gettimeofday.c:105
#define USECS_PER_SEC
Definition: timestamp.h:106
#define SECS_PER_DAY
Definition: timestamp.h:98
#define NULL
Definition: c.h:226
#define UNIX_EPOCH_JDATE
Definition: timestamp.h:184
#define POSTGRES_EPOCH_JDATE
Definition: timestamp.h:185
void feTimestampDifference ( int64  start_time,
int64  stop_time,
long *  secs,
int *  microsecs 
)

Definition at line 464 of file streamutil.c.

References start_time, and USECS_PER_SEC.

Referenced by CalculateCopyStreamSleeptime(), and StreamLogicalLog().

466 {
467  int64 diff = stop_time - start_time;
468 
469  if (diff <= 0)
470  {
471  *secs = 0;
472  *microsecs = 0;
473  }
474  else
475  {
476  *secs = (long) (diff / USECS_PER_SEC);
477  *microsecs = (int) (diff % USECS_PER_SEC);
478  }
479 }
#define USECS_PER_SEC
Definition: timestamp.h:106
static time_t start_time
Definition: pg_ctl.c:94
bool feTimestampDifferenceExceeds ( int64  start_time,
int64  stop_time,
int  msec 
)

Definition at line 486 of file streamutil.c.

References INT64CONST, and start_time.

Referenced by HandleCopyStream(), and StreamLogicalLog().

489 {
490  int64 diff = stop_time - start_time;
491 
492  return (diff >= msec * INT64CONST(1000));
493 }
static time_t start_time
Definition: pg_ctl.c:94
#define INT64CONST(x)
Definition: c.h:307
PGconn* GetConnection ( void  )

Definition at line 53 of file streamutil.c.

References _, Assert, CONNECTION_BAD, CONNECTION_OK, connection_string, dbgetpassword, dbhost, dbname, dbport, dbuser, free, have_password, i, _PQconninfoOption::keyword, NULL, password, pg_malloc0(), PQconnectdbParams(), PQconnectionNeedsPassword(), PQconninfoFree(), PQconninfoParse(), PQerrorMessage(), PQfinish(), PQparameterStatus(), PQstatus(), progname, simple_prompt(), _PQconninfoOption::val, and values.

54 {
55  PGconn *tmpconn;
56  int argcount = 7; /* dbname, replication, fallback_app_name,
57  * host, user, port, password */
58  int i;
59  const char **keywords;
60  const char **values;
61  const char *tmpparam;
62  bool need_password;
63  PQconninfoOption *conn_opts = NULL;
64  PQconninfoOption *conn_opt;
65  char *err_msg = NULL;
66 
67  /* pg_recvlogical uses dbname only; others use connection_string only. */
69 
70  /*
71  * Merge the connection info inputs given in form of connection string,
72  * options and default values (dbname=replication, replication=true, etc.)
73  * Explicitly discard any dbname value in the connection string;
74  * otherwise, PQconnectdbParams() would interpret that value as being
75  * itself a connection string.
76  */
77  i = 0;
79  {
80  conn_opts = PQconninfoParse(connection_string, &err_msg);
81  if (conn_opts == NULL)
82  {
83  fprintf(stderr, "%s: %s", progname, err_msg);
84  exit(1);
85  }
86 
87  for (conn_opt = conn_opts; conn_opt->keyword != NULL; conn_opt++)
88  {
89  if (conn_opt->val != NULL && conn_opt->val[0] != '\0' &&
90  strcmp(conn_opt->keyword, "dbname") != 0)
91  argcount++;
92  }
93 
94  keywords = pg_malloc0((argcount + 1) * sizeof(*keywords));
95  values = pg_malloc0((argcount + 1) * sizeof(*values));
96 
97  for (conn_opt = conn_opts; conn_opt->keyword != NULL; conn_opt++)
98  {
99  if (conn_opt->val != NULL && conn_opt->val[0] != '\0' &&
100  strcmp(conn_opt->keyword, "dbname") != 0)
101  {
102  keywords[i] = conn_opt->keyword;
103  values[i] = conn_opt->val;
104  i++;
105  }
106  }
107  }
108  else
109  {
110  keywords = pg_malloc0((argcount + 1) * sizeof(*keywords));
111  values = pg_malloc0((argcount + 1) * sizeof(*values));
112  }
113 
114  keywords[i] = "dbname";
115  values[i] = dbname == NULL ? "replication" : dbname;
116  i++;
117  keywords[i] = "replication";
118  values[i] = dbname == NULL ? "true" : "database";
119  i++;
120  keywords[i] = "fallback_application_name";
121  values[i] = progname;
122  i++;
123 
124  if (dbhost)
125  {
126  keywords[i] = "host";
127  values[i] = dbhost;
128  i++;
129  }
130  if (dbuser)
131  {
132  keywords[i] = "user";
133  values[i] = dbuser;
134  i++;
135  }
136  if (dbport)
137  {
138  keywords[i] = "port";
139  values[i] = dbport;
140  i++;
141  }
142 
143  /* If -W was given, force prompt for password, but only the first time */
144  need_password = (dbgetpassword == 1 && !have_password);
145 
146  do
147  {
148  /* Get a new password if appropriate */
149  if (need_password)
150  {
151  simple_prompt("Password: ", password, sizeof(password), false);
152  have_password = true;
153  need_password = false;
154  }
155 
156  /* Use (or reuse, on a subsequent connection) password if we have it */
157  if (have_password)
158  {
159  keywords[i] = "password";
160  values[i] = password;
161  }
162  else
163  {
164  keywords[i] = NULL;
165  values[i] = NULL;
166  }
167 
168  tmpconn = PQconnectdbParams(keywords, values, true);
169 
170  /*
171  * If there is too little memory even to allocate the PGconn object
172  * and PQconnectdbParams returns NULL, we call exit(1) directly.
173  */
174  if (!tmpconn)
175  {
176  fprintf(stderr, _("%s: could not connect to server\n"),
177  progname);
178  exit(1);
179  }
180 
181  /* If we need a password and -w wasn't given, loop back and get one */
182  if (PQstatus(tmpconn) == CONNECTION_BAD &&
183  PQconnectionNeedsPassword(tmpconn) &&
184  dbgetpassword != -1)
185  {
186  PQfinish(tmpconn);
187  need_password = true;
188  }
189  }
190  while (need_password);
191 
192  if (PQstatus(tmpconn) != CONNECTION_OK)
193  {
194  fprintf(stderr, _("%s: could not connect to server: %s"),
195  progname, PQerrorMessage(tmpconn));
196  PQfinish(tmpconn);
197  free(values);
198  free(keywords);
199  if (conn_opts)
200  PQconninfoFree(conn_opts);
201  return NULL;
202  }
203 
204  /* Connection ok! */
205  free(values);
206  free(keywords);
207  if (conn_opts)
208  PQconninfoFree(conn_opts);
209 
210  /*
211  * Ensure we have the same value of integer timestamps as the server we
212  * are connecting to.
213  */
214  tmpparam = PQparameterStatus(tmpconn, "integer_datetimes");
215  if (!tmpparam)
216  {
217  fprintf(stderr,
218  _("%s: could not determine server setting for integer_datetimes\n"),
219  progname);
220  PQfinish(tmpconn);
221  exit(1);
222  }
223 
224 #ifdef HAVE_INT64_TIMESTAMP
225  if (strcmp(tmpparam, "on") != 0)
226 #else
227  if (strcmp(tmpparam, "off") != 0)
228 #endif
229  {
230  fprintf(stderr,
231  _("%s: integer_datetimes compile flag does not match server\n"),
232  progname);
233  PQfinish(tmpconn);
234  exit(1);
235  }
236 
237  return tmpconn;
238 }
static char password[100]
Definition: streamutil.c:44
char * PQerrorMessage(const PGconn *conn)
Definition: fe-connect.c:5960
const char * PQparameterStatus(const PGconn *conn, const char *paramName)
Definition: fe-connect.c:5925
void PQfinish(PGconn *conn)
Definition: fe-connect.c:3517
PGconn * PQconnectdbParams(const char *const *keywords, const char *const *values, int expand_dbname)
Definition: fe-connect.c:471
PQconninfoOption * PQconninfoParse(const char *conninfo, char **errmsg)
Definition: fe-connect.c:4604
char * connection_string
Definition: streamutil.c:37
void * pg_malloc0(size_t size)
Definition: fe_memutils.c:53
void simple_prompt(const char *prompt, char *destination, size_t destlen, bool echo)
Definition: sprompt.c:37
void PQconninfoFree(PQconninfoOption *connOptions)
Definition: fe-connect.c:5810
int dbgetpassword
Definition: streamutil.c:42
char * dbport
Definition: streamutil.c:40
#define free(a)
Definition: header.h:60
static bool have_password
Definition: streamutil.c:43
const char * progname
Definition: streamutil.c:36
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:670
char * dbhost
Definition: streamutil.c:38
char * dbname
Definition: streamutil.c:41
static Datum values[MAXATTR]
Definition: bootstrap.c:162
int PQconnectionNeedsPassword(const PGconn *conn)
Definition: fe-connect.c:5994
char * dbuser
Definition: streamutil.c:39
int i
ConnStatusType PQstatus(const PGconn *conn)
Definition: fe-connect.c:5907
#define _(x)
Definition: elog.c:84
bool RunIdentifySystem ( PGconn conn,
char **  sysid,
TimeLineID starttli,
XLogRecPtr startpos,
char **  db_name 
)

Definition at line 249 of file streamutil.c.

References _, Assert, NULL, pg_strdup(), PGRES_TUPLES_OK, PQclear(), PQerrorMessage(), PQexec(), PQgetisnull(), PQgetvalue(), PQnfields(), PQntuples(), PQresultStatus(), PQserverVersion(), and progname.

Referenced by BaseBackup(), main(), and StreamLog().

251 {
252  PGresult *res;
253  uint32 hi,
254  lo;
255 
256  /* Check connection existence */
257  Assert(conn != NULL);
258 
259  res = PQexec(conn, "IDENTIFY_SYSTEM");
260  if (PQresultStatus(res) != PGRES_TUPLES_OK)
261  {
262  fprintf(stderr, _("%s: could not send replication command \"%s\": %s"),
263  progname, "IDENTIFY_SYSTEM", PQerrorMessage(conn));
264 
265  PQclear(res);
266  return false;
267  }
268  if (PQntuples(res) != 1 || PQnfields(res) < 3)
269  {
270  fprintf(stderr,
271  _("%s: could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields\n"),
272  progname, PQntuples(res), PQnfields(res), 1, 3);
273 
274  PQclear(res);
275  return false;
276  }
277 
278  /* Get system identifier */
279  if (sysid != NULL)
280  *sysid = pg_strdup(PQgetvalue(res, 0, 0));
281 
282  /* Get timeline ID to start streaming from */
283  if (starttli != NULL)
284  *starttli = atoi(PQgetvalue(res, 0, 1));
285 
286  /* Get LSN start position if necessary */
287  if (startpos != NULL)
288  {
289  if (sscanf(PQgetvalue(res, 0, 2), "%X/%X", &hi, &lo) != 2)
290  {
291  fprintf(stderr,
292  _("%s: could not parse transaction log location \"%s\"\n"),
293  progname, PQgetvalue(res, 0, 2));
294 
295  PQclear(res);
296  return false;
297  }
298  *startpos = ((uint64) hi) << 32 | lo;
299  }
300 
301  /* Get database name, only available in 9.4 and newer versions */
302  if (db_name != NULL)
303  {
304  *db_name = NULL;
305  if (PQserverVersion(conn) >= 90400)
306  {
307  if (PQnfields(res) < 4)
308  {
309  fprintf(stderr,
310  _("%s: could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields\n"),
311  progname, PQntuples(res), PQnfields(res), 1, 4);
312 
313  PQclear(res);
314  return false;
315  }
316  if (!PQgetisnull(res, 0, 3))
317  *db_name = pg_strdup(PQgetvalue(res, 0, 3));
318  }
319  }
320 
321  PQclear(res);
322  return true;
323 }
int PQnfields(const PGresult *res)
Definition: fe-exec.c:2681
char * PQerrorMessage(const PGconn *conn)
Definition: fe-connect.c:5960
char * PQgetvalue(const PGresult *res, int tup_num, int field_num)
Definition: fe-exec.c:3067
int PQserverVersion(const PGconn *conn)
Definition: fe-connect.c:5950
int PQntuples(const PGresult *res)
Definition: fe-exec.c:2673
ExecStatusType PQresultStatus(const PGresult *res)
Definition: fe-exec.c:2596
char * pg_strdup(const char *in)
Definition: fe_memutils.c:85
unsigned int uint32
Definition: c.h:265
void PQclear(PGresult *res)
Definition: fe-exec.c:650
const char * progname
Definition: streamutil.c:36
#define NULL
Definition: c.h:226
#define Assert(condition)
Definition: c.h:670
static XLogRecPtr startpos
PGresult * PQexec(PGconn *conn, const char *query)
Definition: fe-exec.c:1846
int PQgetisnull(const PGresult *res, int tup_num, int field_num)
Definition: fe-exec.c:3092
#define _(x)
Definition: elog.c:84

Variable Documentation

PGconn* conn

Definition at line 45 of file streamutil.c.

Referenced by BaseBackup(), check_for_isn_and_int8_passing_mismatch(), check_for_jsonb_9_4_usage(), check_for_pg_role_prefix(), check_for_prepared_transactions(), check_for_reg_data_type_usage(), check_is_install_user(), check_loadable_libraries(), cluster_all_databases(), cluster_one_database(), connect_pg_server(), connectDatabase(), connectMaintenanceDatabase(), connectToServer(), create_cursor(), dblink_cancel_query(), dblink_close(), dblink_connect(), dblink_disconnect(), dblink_error_message(), dblink_exec(), dblink_fetch(), dblink_get_notify(), dblink_is_busy(), dblink_open(), dblink_record_internal(), dblink_send_query(), disconnect_and_exit(), doConnect(), dumpBlobs(), dumpDatabase(), dumpTableData_copy(), estimate_path_cost_size(), ExecuteSqlCommand(), fetch_more_data(), freePGconn(), get_db_conn(), get_db_infos(), get_loadable_libraries(), get_rel_infos(), get_tablespace_paths(), init_slot(), libpqrcv_connect(), main(), makeEmptyPGconn(), new_9_0_populate_pg_largeobject_metadata(), old_9_3_check_for_line_data_type_usage(), old_9_6_check_for_unknown_data_type_usage(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresImportForeignSchema(), PQconnectdb(), PQconnectdbParams(), PQconnectStart(), PQconnectStartParams(), PQfireResultCreateEvents(), PQgetResult(), PQping(), PQpingParams(), PQregisterEventProc(), PQreset(), PQresetPoll(), PQsetdbLogin(), reindex_all_databases(), reindex_one_database(), reindex_system_catalogs(), run_permutation(), set_frozenxids(), setup_connection(), sql_conn(), start_postmaster(), StartLogStreamer(), StreamLog(), StreamLogicalLog(), try_complete_step(), vacuum_all_databases(), vacuum_one_database(), and vacuumlo().

char* connection_string

Definition at line 37 of file streamutil.c.

Referenced by GetConnection(), and main().

int dbgetpassword

Definition at line 42 of file streamutil.c.

Referenced by GetConnection(), and main().

char* dbhost

Definition at line 38 of file streamutil.c.

Referenced by GetConnection(), and main().

char* dbport

Definition at line 40 of file streamutil.c.

Referenced by GetConnection(), and main().

char* dbuser

Definition at line 39 of file streamutil.c.

Referenced by GetConnection(), and main().

const char* progname

Definition at line 37 of file pg_standby.c.