|
PostgreSQL Source Code git master
|
#include "postgres_fe.h"#include <ctype.h>#include <sys/stat.h>#include "common/string.h"#include "connectdb.h"#include "dumputils.h"#include "fe_utils/option_utils.h"#include "fe_utils/string_utils.h"#include "filter.h"#include "getopt_long.h"#include "parallel.h"#include "pg_backup_utils.h"
Go to the source code of this file.
Data Structures | |
| struct | DbOidName |
Typedefs | |
| typedef struct DbOidName | DbOidName |
Functions | |
| static void | usage (const char *progname) |
| static void | read_restore_filters (const char *filename, RestoreOptions *opts) |
| static bool | file_exists_in_directory (const char *dir, const char *filename) |
| static int | restore_one_database (const char *inputFileSpec, RestoreOptions *opts, int numWorkers, bool append_data) |
| static int | restore_global_objects (const char *inputFileSpec, RestoreOptions *opts) |
| static int | restore_all_databases (const char *inputFileSpec, SimpleStringList db_exclude_patterns, RestoreOptions *opts, int numWorkers) |
| static int | get_dbnames_list_to_restore (PGconn *conn, SimplePtrList *dbname_oid_list, SimpleStringList db_exclude_patterns) |
| static int | get_dbname_oid_list_from_mfile (const char *dumpdirpatharg, SimplePtrList *dbname_oid_list) |
| int | main (int argc, char **argv) |
Definition at line 936 of file pg_restore.c.
References buf, filename, MAXPGPATH, pg_fatal, S_ISREG, snprintf, stat::st_mode, and stat.
Referenced by get_dbname_oid_list_from_mfile(), main(), and restore_all_databases().
|
static |
Definition at line 1054 of file pg_restore.c.
References dbname, fb(), file_exists_in_directory(), initStringInfo(), InvalidOid, len, MAXPGPATH, OidIsValid, pfree(), PG_BINARY_R, pg_fatal, pg_get_line_buf(), pg_log_info, pg_malloc(), pstrdup(), simple_ptr_list_append(), snprintf, str, and strlcpy().
Referenced by restore_all_databases().
|
static |
Definition at line 957 of file pg_restore.c.
References appendPQExpBufferStr(), appendStringLiteralConn(), conn, createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), executeQuery(), exit_nicely(), fb(), InvalidOid, pg_log_error, pg_log_info, pg_strcasecmp(), PQclear, PQfinish(), PQntuples, processSQLNamePattern(), and resetPQExpBuffer().
Referenced by restore_all_databases().
Definition at line 85 of file pg_restore.c.
References archCustom, archDirectory, archTar, archUnknown, check_mut_excl_opts, disable_triggers, DUMP_PRE_DATA, exit_nicely(), fb(), file_exists_in_directory(), generate_restrict_key(), get_progname(), getopt_long(), if_exists, init_parallel_dump_utils(), MAXPGPATH, NewRestoreOptions(), no_argument, no_comments, no_data, no_policies, no_publications, no_schema, no_security_labels, no_statistics, no_subscriptions, optarg, optind, option_parse_int(), opts, pg_fatal, pg_log_error, pg_log_error_hint, pg_log_info, pg_log_warning, PG_LOG_WARNING, pg_logging_increase_verbosity(), pg_logging_init(), pg_logging_set_level(), pg_malloc0_object, PG_MAX_JOBS, pg_strcasecmp(), pg_strdup(), PG_TEXTDOMAIN, progname, read_restore_filters(), required_argument, restore_all_databases(), restore_global_objects(), restore_one_database(), set_dump_section(), set_pglocale_pgservice(), simple_string_list_append(), simple_string_list_destroy(), snprintf, statistics_only, AmcheckOptions::strict_names, strict_names, TRI_NO, TRI_YES, usage(), use_setsessauth, valid_restrict_key(), AmcheckOptions::verbose, and with_statistics.
|
static |
Definition at line 838 of file pg_restore.c.
References _, Assert, exit_nicely(), fb(), filename, FILTER_COMMAND_TYPE_EXCLUDE, FILTER_COMMAND_TYPE_INCLUDE, FILTER_COMMAND_TYPE_NONE, filter_free(), filter_init(), FILTER_OBJECT_TYPE_DATABASE, FILTER_OBJECT_TYPE_EXTENSION, FILTER_OBJECT_TYPE_FOREIGN_DATA, FILTER_OBJECT_TYPE_FUNCTION, FILTER_OBJECT_TYPE_INDEX, filter_object_type_name(), FILTER_OBJECT_TYPE_NONE, FILTER_OBJECT_TYPE_SCHEMA, FILTER_OBJECT_TYPE_TABLE, FILTER_OBJECT_TYPE_TABLE_AND_CHILDREN, FILTER_OBJECT_TYPE_TABLE_DATA, FILTER_OBJECT_TYPE_TABLE_DATA_AND_CHILDREN, FILTER_OBJECT_TYPE_TRIGGER, filter_read_item(), free, opts, pg_log_filter_error(), and simple_string_list_append().
Referenced by main().
|
static |
Definition at line 1159 of file pg_restore.c.
References conn, ConnectDatabase(), exit_nicely(), fb(), file_exists_in_directory(), get_dbname_oid_list_from_mfile(), get_dbnames_list_to_restore(), InvalidOid, MAXPGPATH, ngettext, opts, pfree(), pg_fatal, pg_free(), pg_log_error, pg_log_error_hint, pg_log_info, pg_log_warning, pg_malloc0_object, PQfinish(), progname, restore_one_database(), simple_ptr_list_destroy(), snprintf, and TRI_DEFAULT.
Referenced by main().
|
static |
Definition at line 651 of file pg_restore.c.
References archCustom, CloseArchive(), Archive::exit_on_error, fb(), Archive::n_errors, Archive::numWorkers, on_exit_close_archive(), OpenArchive(), opts, ProcessArchiveRestoreOptions(), RestoreArchive(), SetArchiveOptions(), AmcheckOptions::verbose, and Archive::verbose.
Referenced by main().
|
static |
Definition at line 696 of file pg_restore.c.
References append_data(), CloseArchive(), Archive::exit_on_error, fb(), Archive::n_errors, Archive::numWorkers, on_exit_close_archive(), OpenArchive(), opts, PrintTOCSummary(), ProcessArchiveRestoreOptions(), replace_on_exit_close_archive(), RestoreArchive(), SetArchiveOptions(), SortTocFromFile(), AmcheckOptions::verbose, and Archive::verbose.
Referenced by main(), and restore_all_databases().
Definition at line 749 of file pg_restore.c.