Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit83f26c5

Browse files
committed
Exclude additional directories and files in pgdata_exclude_dir[] and pgdata_exclude_files[]
1 parent6a79870 commit83f26c5

File tree

1 file changed

+47
-6
lines changed

1 file changed

+47
-6
lines changed

‎dir.c

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,59 @@
2020
#include"pgut/pgut-port.h"
2121
#include"datapagemap.h"
2222

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+
*/
2428
constchar*pgdata_exclude_dir[]=
2529
{
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
3167
};
3268

3369
staticchar*pgdata_exclude_files[]=
3470
{
71+
/* Skip auto conf temporary file. */
72+
"postgresql.auto.conf.tmp",
73+
74+
/* Skip current log file temporary file */
75+
"current_logfiles.tmp",
3576
"recovery.conf",
3677
"postmaster.pid",
3778
"postmaster.opts",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp