Definition at line 27 of file vacuumdb.c.
28{
64 };
65
76 int ret;
77
78
84
85
86 memset(&cparams, 0,
sizeof(cparams));
88
92
94
95 while ((
c =
getopt_long(argc, argv,
"ad:efFh:j:n:N:p:P:qt:U:vwWzZ",
97 {
99 {
100 case 'a':
102 break;
103 case 'd':
106 break;
107 case 'e':
109 break;
110 case 'f':
112 break;
113 case 'F':
115 break;
116 case 'h':
118 break;
119 case 'j':
123 break;
124 case 'n':
127 break;
128 case 'N':
131 break;
132 case 'p':
134 break;
135 case 'P':
139 break;
140 case 'q':
142 break;
143 case 't':
147 break;
148 case 'U':
150 break;
151 case 'v':
153 break;
154 case 'w':
156 break;
157 case 'W':
159 break;
160 case 'z':
162 break;
163 case 'Z':
164
167 break;
168 case 2:
170 break;
171 case 3:
173 break;
174 case 4:
175 vacopts.disable_page_skipping =
true;
176 break;
177 case 5:
179 break;
180 case 6:
184 break;
185 case 7:
189 break;
190 case 8:
191 vacopts.no_index_cleanup =
true;
192 break;
193 case 9:
194 vacopts.force_index_cleanup =
true;
195 break;
196 case 10:
198 break;
199 case 11:
201 break;
202 case 12:
204 break;
205 case 13:
207 break;
208 case 14:
209 vacopts.missing_stats_only =
true;
210 break;
211 case 15:
213 break;
214 default:
215
218 }
219 }
220
221
222
223
224
226 {
230 }
231
233 {
234 pg_log_error(
"too many command-line arguments (first is \"%s\")",
238 }
239
240
241
242
243
245
248 {
250 pg_fatal(
"cannot use the \"%s\" option when performing only analyze",
251 "full");
253 pg_fatal(
"cannot use the \"%s\" option when performing only analyze",
254 "freeze");
255 if (
vacopts.disable_page_skipping)
256 pg_fatal(
"cannot use the \"%s\" option when performing only analyze",
257 "disable-page-skipping");
259 pg_fatal(
"cannot use the \"%s\" option when performing only analyze",
260 "no-index-cleanup");
261 if (
vacopts.force_index_cleanup)
262 pg_fatal(
"cannot use the \"%s\" option when performing only analyze",
263 "force-index-cleanup");
265 pg_fatal(
"cannot use the \"%s\" option when performing only analyze",
266 "no-truncate");
268 pg_fatal(
"cannot use the \"%s\" option when performing only analyze",
269 "no-process-main");
271 pg_fatal(
"cannot use the \"%s\" option when performing only analyze",
272 "no-process-toast");
273
274 }
275
276
277 if (
vacopts.parallel_workers >= 0)
278 {
281 pg_fatal(
"cannot use the \"%s\" option when performing only analyze",
282 "parallel");
284 pg_fatal(
"cannot use the \"%s\" option when performing full vacuum",
285 "parallel");
286 }
287
288
290 pg_fatal(
"cannot use the \"%s\" option with the \"%s\" option",
291 "no-index-cleanup", "force-index-cleanup");
292
293
294
295
296
298 pg_fatal(
"cannot use the \"%s\" option with the \"%s\" option",
299 "buffer-usage-limit", "full");
300
301
302
303
304
307 pg_fatal(
"cannot use the \"%s\" option without \"%s\" or \"%s\"",
308 "missing-stats-only", "analyze-only", "analyze-in-stages");
309
312 "No commands will be sent to the server.");
313
319}
#define PG_TEXTDOMAIN(domain)
void set_pglocale_pgservice(const char *argv0, const char *app)
char * pg_strdup(const char *in)
int getopt_long(int argc, char *const argv[], const char *optstring, const struct option *longopts, int *longindex)
#define required_argument
static char * escape_quotes(const char *src)
void pg_logging_init(const char *argv0)
#define pg_log_error(...)
#define pg_log_error_hint(...)
bool option_parse_int(const char *optarg, const char *optname, int min_range, int max_range, int *result)
void handle_help_version_opts(int argc, char *argv[], const char *fixed_progname, help_handler hlp)
PGDLLIMPORT char * optarg
const char * get_progname(const char *argv0)
void simple_string_list_append(SimpleStringList *list, const char *val)
enum trivalue prompt_password
static void check_objfilter(bits32 objfilter)
int vacuuming_main(ConnParams *cparams, const char *dbname, const char *maintenance_db, vacuumingOptions *vacopts, SimpleStringList *objects, unsigned int tbl_count, int concurrentCons, const char *progname)
References check_objfilter(), dbname, escape_quotes(), fb(), get_progname(), getopt_long(), handle_help_version_opts(), help(), MODE_ANALYZE, MODE_ANALYZE_IN_STAGES, no_argument, OBJFILTER_ALL_DBS, OBJFILTER_DATABASE, OBJFILTER_SCHEMA, OBJFILTER_SCHEMA_EXCLUDE, OBJFILTER_TABLE, optarg, optind, option_parse_int(), pg_fatal, pg_log_error, pg_log_error_hint, pg_log_info, pg_logging_init(), pg_strdup(), PG_TEXTDOMAIN, _connParams::pghost, _connParams::pgport, _connParams::pguser, progname, _connParams::prompt_password, required_argument, set_pglocale_pgservice(), simple_string_list_append(), TRI_DEFAULT, TRI_NO, TRI_YES, and vacuuming_main().