MCPcopy Create free account
hub / github.com/apache/cloudberry / main

Function main

src/bin/scripts/vacuumdb.c:75–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74
75int
76main(int argc, char *argv[])
77{
78 static struct option long_options[] = {
79 {"host", required_argument, NULL, 'h'},
80 {"port", required_argument, NULL, 'p'},
81 {"username", required_argument, NULL, 'U'},
82 {"no-password", no_argument, NULL, 'w'},
83 {"password", no_argument, NULL, 'W'},
84 {"echo", no_argument, NULL, 'e'},
85 {"quiet", no_argument, NULL, 'q'},
86 {"dbname", required_argument, NULL, 'd'},
87 {"analyze", no_argument, NULL, 'z'},
88 {"analyze-only", no_argument, NULL, 'Z'},
89 {"freeze", no_argument, NULL, 'F'},
90 {"all", no_argument, NULL, 'a'},
91 {"table", required_argument, NULL, 't'},
92 {"full", no_argument, NULL, 'f'},
93 {"verbose", no_argument, NULL, 'v'},
94 {"jobs", required_argument, NULL, 'j'},
95 {"parallel", required_argument, NULL, 'P'},
96 {"maintenance-db", required_argument, NULL, 2},
97 {"analyze-in-stages", no_argument, NULL, 3},
98 {"disable-page-skipping", no_argument, NULL, 4},
99 {"skip-locked", no_argument, NULL, 5},
100 {"min-xid-age", required_argument, NULL, 6},
101 {"min-mxid-age", required_argument, NULL, 7},
102 {"no-index-cleanup", no_argument, NULL, 8},
103 {"force-index-cleanup", no_argument, NULL, 9},
104 {"no-truncate", no_argument, NULL, 10},
105 {"no-process-toast", no_argument, NULL, 11},
106 {NULL, 0, NULL, 0}
107 };
108
109 const char *progname;
110 int optindex;
111 int c;
112 const char *dbname = NULL;
113 const char *maintenance_db = NULL;
114 char *host = NULL;
115 char *port = NULL;
116 char *username = NULL;
117 enum trivalue prompt_password = TRI_DEFAULT;
118 ConnParams cparams;
119 bool echo = false;
120 bool quiet = false;
121 vacuumingOptions vacopts;
122 bool analyze_in_stages = false;
123 bool alldb = false;
124 SimpleStringList tables = {NULL, NULL};
125 int concurrentCons = 1;
126 int tbl_count = 0;
127
128 /* initialize options */
129 memset(&vacopts, 0, sizeof(vacopts));
130 vacopts.parallel_workers = -1;
131 vacopts.no_index_cleanup = false;
132 vacopts.force_index_cleanup = false;

Callers

nothing calls this directly

Calls 11

pg_logging_initFunction · 0.85
get_prognameFunction · 0.85
set_pglocale_pgserviceFunction · 0.85
handle_help_version_optsFunction · 0.85
getopt_longFunction · 0.85
pg_strdupFunction · 0.85
vacuum_all_databasesFunction · 0.85
get_user_name_or_exitFunction · 0.85
vacuum_one_databaseFunction · 0.85
setup_cancel_handlerFunction · 0.50

Tested by

no test coverage detected