PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include <time.h>
#include "common/string.h"
#include "getopt_long.h"
#include "pg_upgrade.h"
#include "utils/pidfile.h"
Go to the source code of this file.
Macros | |
#define | FIX_DEFAULT_READ_ONLY "-c default_transaction_read_only=false" |
Functions | |
static void | usage (void) |
static void | check_required_directory (char **dirpath, const char *envVarName, bool useCwd, const char *cmdLineOption, const char *description, bool missingOk) |
void | parseCommandLine (int argc, char *argv[]) |
void | adjust_data_dir (ClusterInfo *cluster) |
void | get_sock_dir (ClusterInfo *cluster, bool live_check) |
Variables | |
UserOpts | user_opts |
#define FIX_DEFAULT_READ_ONLY "-c default_transaction_read_only=false" |
Definition at line 27 of file option.c.
Referenced by parseCommandLine().
void adjust_data_dir | ( | ClusterInfo * | cluster | ) |
Definition at line 403 of file option.c.
References ClusterInfo::bindir, check_ok(), filename, MAX_STRING, MAXPGPATH, old_cluster, output(), pg_fatal, pg_strdup(), pg_strip_crlf(), ClusterInfo::pgconfig, ClusterInfo::pgdata, prep_status(), snprintf, and strerror.
|
static |
Definition at line 358 of file option.c.
References canonicalize_path(), MAXPGPATH, pg_fatal, and pg_strdup().
Referenced by parseCommandLine().
void get_sock_dir | ( | ClusterInfo * | cluster, |
bool | live_check | ||
) |
Definition at line 468 of file option.c.
References DEF_PGUPORT, filename, GET_MAJOR_VERSION, LOCK_FILE_LINE_PORT, LOCK_FILE_LINE_SOCKET_DIR, ClusterInfo::major_version, Max, MAXPGPATH, old_cluster, pg_fatal, pg_log(), pg_strdup(), pg_strip_crlf(), PG_WARNING, ClusterInfo::pgdata, ClusterInfo::port, snprintf, ClusterInfo::sockdir, UserOpts::socketdir, and strerror.
Referenced by main().
void parseCommandLine | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 39 of file option.c.
References _, ClusterInfo::bindir, canonicalize_path(), UserOpts::check, check_required_directory(), DEF_PGUPORT, filename, FIX_DEFAULT_READ_ONLY, fopen_priv, fprintf, free, get_progname(), get_user_info(), getopt_long(), LogOpts::internal, INTERNAL_LOG_FILE, UserOpts::jobs, log_opts, MAXPGPATH, new_cluster, no_argument, old_cluster, optarg, optind, os_info, output_files, path_is_prefix_of_path(), pfree(), pg_fatal, pg_free(), pg_log(), pg_putenv(), PG_REPORT, pg_strdup(), ClusterInfo::pgdata, ClusterInfo::pgopts, ClusterInfo::port, OSInfo::progname, psprintf(), required_argument, LogOpts::retain, UserOpts::socketdir, strlcpy(), UserOpts::transfer_mode, TRANSFER_MODE_CLONE, TRANSFER_MODE_COPY, TRANSFER_MODE_LINK, usage(), OSInfo::user, OSInfo::user_specified, and LogOpts::verbose.
Referenced by main().
|
static |
Definition at line 286 of file option.c.
References _, new_cluster, old_cluster, os_info, ClusterInfo::port, printf, and OSInfo::user.
Referenced by parseCommandLine().
UserOpts user_opts |
Definition at line 30 of file option.c.
Referenced by check_and_dump_old_cluster(), check_new_cluster(), main(), output_check_banner(), parallel_exec_prog(), parallel_transfer_all_new_dbs(), reap_child(), report_clusters_compatible(), setup(), transfer_all_new_tablespaces(), and transfer_relfile().