|
PostgreSQL Source Code git master
|
#include "postgres_fe.h"#include <sys/stat.h>#include "common/file_perm.h"#include "common/file_utils.h"#include "common/int.h"#include "common/logging.h"#include "pg_upgrade.h"
Go to the source code of this file.
Macros | |
| #define | SYNC_QUEUE_MAX_LEN (1024) |
Variables | |
| static char * | sync_queue [SYNC_QUEUE_MAX_LEN] |
| static bool | sync_queue_inited |
| static int | sync_queue_len |
| #define SYNC_QUEUE_MAX_LEN (1024) |
Definition at line 42 of file relfilenumber.c.
|
static |
Definition at line 445 of file relfilenumber.c.
References fb(), FileNameMapCmp(), maps, MAXPGPATH, new_cluster, ClusterInfo::num_tablespaces, old_cluster, ClusterInfo::pgdata, prepare_for_swap(), qsort, swap_catalog_files(), and ClusterInfo::tablespaces.
Referenced by transfer_single_new_db().
Definition at line 308 of file relfilenumber.c.
References a, b, pg_cmp_u32(), and FileNameMap::relfilenumber.
Referenced by do_swap(), and swap_catalog_files().
|
static |
Definition at line 324 of file relfilenumber.c.
References fb(), filename, InvalidRelFileNumber, and PG_UINT32_MAX.
Referenced by swap_catalog_files().
|
static |
Definition at line 239 of file relfilenumber.c.
References fb(), MAXPGPATH, new_cluster, old_cluster, pg_dir_create_mode, pg_fatal, pg_mkdir_p(), ClusterInfo::pgdata, snprintf, stat, and ClusterInfo::tablespace_suffix.
Referenced by do_swap().
|
static |
Definition at line 355 of file relfilenumber.c.
References closedir(), UserOpts::do_sync, fb(), FileNameMapCmp(), fsync_fname(), fsync_parent_path(), get_dirent_type(), maps, MAXPGPATH, opendir(), parse_relfilenumber(), pg_fatal, PG_LOG_ERROR, PGFILETYPE_REG, readdir(), RelFileNumberIsValid, snprintf, sync_queue_push(), and user_opts.
Referenced by do_swap().
Definition at line 87 of file relfilenumber.c.
References fb(), i, pfree(), sync_queue, sync_queue_inited, sync_queue_len, and SYNC_QUEUE_MAX_LEN.
Referenced by transfer_all_new_dbs().
Definition at line 49 of file relfilenumber.c.
References i, MAXPGPATH, palloc(), sync_queue, sync_queue_inited, and SYNC_QUEUE_MAX_LEN.
Referenced by sync_queue_push().
Definition at line 75 of file relfilenumber.c.
References fb(), MAXPGPATH, sync_queue, sync_queue_init(), sync_queue_len, SYNC_QUEUE_MAX_LEN, and sync_queue_sync_all().
Referenced by swap_catalog_files().
Definition at line 60 of file relfilenumber.c.
References fsync_fname(), i, pg_fatal, sync_queue, sync_queue_inited, and sync_queue_len.
Referenced by sync_queue_push(), and transfer_all_new_dbs().
| void transfer_all_new_dbs | ( | DbInfoArr * | old_db_arr, |
| DbInfoArr * | new_db_arr, | ||
| char * | old_pgdata, | ||
| char * | new_pgdata, | ||
| char * | old_tablespace, | ||
| char * | new_tablespace | ||
| ) |
Definition at line 172 of file relfilenumber.c.
References fb(), gen_db_file_maps(), pg_fatal, pg_free(), sync_queue_destroy(), sync_queue_sync_all(), and transfer_single_new_db().
Referenced by parallel_transfer_all_new_dbs().
| void transfer_all_new_tablespaces | ( | DbInfoArr * | old_db_arr, |
| DbInfoArr * | new_db_arr, | ||
| char * | old_pgdata, | ||
| char * | new_pgdata | ||
| ) |
Definition at line 108 of file relfilenumber.c.
References check_ok(), end_progress_output(), fb(), UserOpts::jobs, new_cluster, ClusterInfo::num_tablespaces, old_cluster, parallel_transfer_all_new_dbs(), prep_status_progress(), reap_child(), ClusterInfo::tablespaces, UserOpts::transfer_mode, TRANSFER_MODE_CLONE, TRANSFER_MODE_COPY, TRANSFER_MODE_COPY_FILE_RANGE, TRANSFER_MODE_LINK, TRANSFER_MODE_SWAP, and user_opts.
Referenced by main().
|
static |
Definition at line 548 of file relfilenumber.c.
References cloneFile(), copyFile(), copyFileByRange(), FileNameMap::db_oid, fb(), linkFile(), MAXPGPATH, FileNameMap::new_tablespace, FileNameMap::new_tablespace_suffix, FileNameMap::nspname, FileNameMap::old_tablespace, FileNameMap::old_tablespace_suffix, pg_fatal, pg_log(), PG_STATUS, PG_VERBOSE, FileNameMap::relfilenumber, FileNameMap::relname, rewriteVisibilityMap(), snprintf, stat, UserOpts::transfer_mode, TRANSFER_MODE_CLONE, TRANSFER_MODE_COPY, TRANSFER_MODE_COPY_FILE_RANGE, TRANSFER_MODE_LINK, TRANSFER_MODE_SWAP, and user_opts.
Referenced by transfer_single_new_db().
|
static |
Definition at line 495 of file relfilenumber.c.
References Assert, ControlData::cat_ver, ClusterInfo::controldata, do_swap(), fb(), maps, new_cluster, old_cluster, UserOpts::transfer_mode, TRANSFER_MODE_SWAP, transfer_relfile(), user_opts, and VISIBILITY_MAP_FROZEN_BIT_CAT_VER.
Referenced by transfer_all_new_dbs().
|
static |
Definition at line 44 of file relfilenumber.c.
Referenced by sync_queue_destroy(), sync_queue_init(), sync_queue_push(), and sync_queue_sync_all().
|
static |
Definition at line 45 of file relfilenumber.c.
Referenced by sync_queue_destroy(), sync_queue_init(), and sync_queue_sync_all().
|
static |
Definition at line 46 of file relfilenumber.c.
Referenced by sync_queue_destroy(), sync_queue_push(), and sync_queue_sync_all().