|
PostgreSQL Source Code git master
|
#include "datapagemap.h"#include "storage/block.h"#include "storage/relfilelocator.h"#include "access/xlogdefs.h"

Go to the source code of this file.
Data Structures | |
| struct | file_entry_t |
| struct | filemap_t |
Typedefs | |
| typedef struct file_entry_t | file_entry_t |
| typedef struct filemap_t | filemap_t |
Enumerations | |
| enum | file_action_t { FILE_ACTION_UNDECIDED = 0 , FILE_ACTION_CREATE , FILE_ACTION_COPY , FILE_ACTION_COPY_TAIL , FILE_ACTION_NONE , FILE_ACTION_TRUNCATE , FILE_ACTION_REMOVE } |
| enum | file_type_t { FILE_TYPE_UNDEFINED = 0 , FILE_TYPE_REGULAR , FILE_TYPE_DIRECTORY , FILE_TYPE_SYMLINK } |
| enum | file_content_type_t { FILE_CONTENT_TYPE_OTHER = 0 , FILE_CONTENT_TYPE_RELATION , FILE_CONTENT_TYPE_WAL } |
Functions | |
| void | filehash_init (void) |
| void | process_source_file (const char *path, file_type_t type, size_t size, const char *link_target) |
| void | process_target_file (const char *path, file_type_t type, size_t size, const char *link_target) |
| void | process_target_wal_block_change (ForkNumber forknum, RelFileLocator rlocator, BlockNumber blkno) |
| filemap_t * | decide_file_actions (XLogSegNo last_common_segno) |
| void | calculate_totals (filemap_t *filemap) |
| void | print_filemap (filemap_t *filemap) |
| void | keepwal_init (void) |
| void | keepwal_add_entry (const char *path) |
| typedef struct file_entry_t file_entry_t |
| enum file_action_t |
| Enumerator | |
|---|---|
| FILE_ACTION_UNDECIDED | |
| FILE_ACTION_CREATE | |
| FILE_ACTION_COPY | |
| FILE_ACTION_COPY_TAIL | |
| FILE_ACTION_NONE | |
| FILE_ACTION_TRUNCATE | |
| FILE_ACTION_REMOVE | |
| enum file_content_type_t |
| Enumerator | |
|---|---|
| FILE_CONTENT_TYPE_OTHER | |
| FILE_CONTENT_TYPE_RELATION | |
| FILE_CONTENT_TYPE_WAL | |
| enum file_type_t |
| Enumerator | |
|---|---|
| FILE_TYPE_UNDEFINED | |
| FILE_TYPE_REGULAR | |
| FILE_TYPE_DIRECTORY | |
| FILE_TYPE_SYMLINK | |
| void calculate_totals | ( | filemap_t * | filemap | ) |
Definition at line 500 of file filemap.c.
References file_entry_t::action, datapagemap::bitmapsize, datapagemap_iterate(), datapagemap_next(), filemap_t::entries, filemap_t::fetch_size, FILE_ACTION_COPY, FILE_ACTION_COPY_TAIL, FILE_TYPE_REGULAR, i, filemap_t::nentries, pg_free(), file_entry_t::source_size, file_entry_t::source_type, file_entry_t::target_pages_to_overwrite, file_entry_t::target_size, and filemap_t::total_size.
Referenced by main().
Definition at line 924 of file filemap.c.
References file_entry_t::action, decide_file_action(), filemap_t::entries, filehash, final_filemap_cmp(), i, filemap_t::nentries, pg_malloc(), and qsort.
Referenced by main().
| void filehash_init | ( | void | ) |
Definition at line 197 of file filemap.c.
References filehash, and FILEHASH_INITIAL_SIZE.
Referenced by main().
| void keepwal_add_entry | ( | const char * | path | ) |
Definition at line 251 of file filemap.c.
References Assert(), keepwal, keepwal_entry::path, and pg_strdup().
Referenced by findLastCheckpoint().
| void keepwal_init | ( | void | ) |
Definition at line 243 of file filemap.c.
References keepwal, and KEEPWAL_INITIAL_SIZE.
Referenced by main().
| void print_filemap | ( | filemap_t * | filemap | ) |
Definition at line 541 of file filemap.c.
References file_entry_t::action, action_to_str(), datapagemap::bitmapsize, file_entry_t::content_type, datapagemap_print(), filemap_t::entries, FILE_ACTION_NONE, FILE_CONTENT_TYPE_WAL, i, filemap_t::nentries, file_entry_t::path, pg_log_debug, generate_unaccent_rules::stdout, and file_entry_t::target_pages_to_overwrite.
Referenced by main().
| void process_source_file | ( | const char * | path, |
| file_type_t | type, | ||
| size_t | size, | ||
| const char * | link_target | ||
| ) |
Definition at line 280 of file filemap.c.
References FILE_CONTENT_TYPE_RELATION, FILE_TYPE_DIRECTORY, FILE_TYPE_REGULAR, FILE_TYPE_SYMLINK, getFileContentType(), insert_filehash_entry(), pg_fatal, pg_strdup(), file_entry_t::source_exists, file_entry_t::source_link_target, file_entry_t::source_size, file_entry_t::source_type, and type.
Referenced by main().
| void process_target_file | ( | const char * | path, |
| file_type_t | type, | ||
| size_t | size, | ||
| const char * | link_target | ||
| ) |
Definition at line 316 of file filemap.c.
References FILE_TYPE_DIRECTORY, FILE_TYPE_SYMLINK, insert_filehash_entry(), pg_fatal, pg_strdup(), file_entry_t::target_exists, file_entry_t::target_link_target, file_entry_t::target_size, file_entry_t::target_type, and type.
Referenced by main().
| void process_target_wal_block_change | ( | ForkNumber | forknum, |
| RelFileLocator | rlocator, | ||
| BlockNumber | blkno | ||
| ) |
Definition at line 353 of file filemap.c.
References Assert(), file_entry_t::content_type, datapagemap_add(), datasegpath(), FILE_CONTENT_TYPE_RELATION, FILE_TYPE_REGULAR, lookup_filehash_entry(), file_entry_t::path, pfree(), pg_fatal, file_entry_t::source_exists, file_entry_t::target_exists, file_entry_t::target_pages_to_overwrite, and file_entry_t::target_type.
Referenced by extractPageInfo().