|
20 | 20 | #include"pgut/pgut-port.h"
|
21 | 21 | #include"datapagemap.h"
|
22 | 22 |
|
23 |
| -/* directory exclusion list for backup mode listing */ |
| 23 | +/* |
| 24 | + * The contents of these directories are removed or recreated during server |
| 25 | + * start so they are not included in backups. The directories themselves are |
| 26 | + * kept and included as empty to preserve access permissions. |
| 27 | + */ |
24 | 28 | constchar*pgdata_exclude_dir[]=
|
25 | 29 | {
|
26 |
| -"pg_xlog", |
27 |
| -"pg_stat_tmp", |
28 |
| -"pgsql_tmp", |
29 |
| -NULL,/* pg_log will be set later */ |
30 |
| -NULL |
| 30 | +"pg_xlog", |
| 31 | +/* |
| 32 | + * Skip temporary statistics files. PG_STAT_TMP_DIR must be skipped even |
| 33 | + * when stats_temp_directory is set because PGSS_TEXT_FILE is always created |
| 34 | + * there. |
| 35 | + */ |
| 36 | +"pg_stat_tmp", |
| 37 | +"pgsql_tmp", |
| 38 | + |
| 39 | +/* |
| 40 | + * It is generally not useful to backup the contents of this directory even |
| 41 | + * if the intention is to restore to another master. See backup.sgml for a |
| 42 | + * more detailed description. |
| 43 | + */ |
| 44 | +"pg_replslot", |
| 45 | + |
| 46 | +/* Contents removed on startup, see dsm_cleanup_for_mmap(). */ |
| 47 | +"pg_dynshmem", |
| 48 | + |
| 49 | +/* Contents removed on startup, see AsyncShmemInit(). */ |
| 50 | +"pg_notify", |
| 51 | + |
| 52 | +/* |
| 53 | + * Old contents are loaded for possible debugging but are not required for |
| 54 | + * normal operation, see OldSerXidInit(). |
| 55 | + */ |
| 56 | +"pg_serial", |
| 57 | + |
| 58 | +/* Contents removed on startup, see DeleteAllExportedSnapshotFiles(). */ |
| 59 | +"pg_snapshots", |
| 60 | + |
| 61 | +/* Contents zeroed on startup, see StartupSUBTRANS(). */ |
| 62 | +"pg_subtrans", |
| 63 | + |
| 64 | +/* end of list */ |
| 65 | +NULL,/* pg_log will be set later */ |
| 66 | +NULL |
31 | 67 | };
|
32 | 68 |
|
33 | 69 | staticchar*pgdata_exclude_files[]=
|
34 | 70 | {
|
| 71 | +/* Skip auto conf temporary file. */ |
| 72 | +"postgresql.auto.conf.tmp", |
| 73 | + |
| 74 | +/* Skip current log file temporary file */ |
| 75 | +"current_logfiles.tmp", |
35 | 76 | "recovery.conf",
|
36 | 77 | "postmaster.pid",
|
37 | 78 | "postmaster.opts",
|
|