<para>
Files other than regular files and directories, such as symbolic
links (other than for the directories listed above) and special
- device and operating system files, are skipped. (Symbolic links
+ device files, are skipped. (Symbolic links
in <filename>pg_tblspc</filename> are maintained.)
</para>
</listitem>
The backup will include all files in the data directory and tablespaces,
including the configuration files and any additional files placed in the
directory by third parties, except certain temporary files managed by
- PostgreSQL and operating system files. But only regular files and
- directories are copied, except that
+ PostgreSQL. But only regular files and directories are copied, except that
symbolic links used for tablespaces are preserved. Symbolic links pointing
to certain directories known to PostgreSQL are copied as empty directories.
Other symbolic links and special device files are skipped.
<filename>backup_label</filename>,
<filename>tablespace_map</filename>,
<filename>pg_internal.init</filename>,
- <filename>postmaster.opts</filename>,
- <filename>postmaster.pid</filename> and
- <filename>.DS_Store</filename> as well as any file or directory
+ <filename>postmaster.opts</filename>, and
+ <filename>postmaster.pid</filename>, as well as any file or directory
beginning with <filename>pgsql_tmp</filename>, are omitted.
</para>
</step>
strlen(PG_TEMP_FILE_PREFIX)) == 0)
continue;
- /* Skip macOS system files */
- if (strcmp(de->d_name, ".DS_Store") == 0)
- continue;
-
/*
* Check if the postmaster has signaled us to exit, and abort with an
* error in that case. The error handler further up will call
close $file;
}
-# Test that macOS system files are skipped. Only test on non-macOS systems
-# however since creating incorrect .DS_Store files on a macOS system may have
-# unintended side effects.
-if ($Config{osname} ne 'darwin')
-{
- open my $file, '>>', "$pgdata/.DS_Store";
- print $file "DONOTCOPY";
- close $file;
-}
-
# Connect to a database to create global/pg_internal.init. If this is removed
# the test to ensure global/pg_internal.init is not copied will return a false
# positive.
ok(!-f "$tempdir/backup/$filename", "$filename not copied");
}
-# We only test .DS_Store files being skipped on non-macOS systems
-if ($Config{osname} ne 'darwin')
-{
- ok(!-f "$tempdir/backup/.DS_Store", ".DS_Store not copied");
-}
-
# Unlogged relation forks other than init should not be copied
ok(-f "$tempdir/backup/${baseUnloggedPath}_init",
'unlogged init fork in backup');
strlen(PG_TEMP_FILES_DIR)) == 0)
continue;
- /* Skip macOS system files */
- if (strcmp(de->d_name, ".DS_Store") == 0)
- continue;
-
snprintf(fn, sizeof(fn), "%s/%s", path, de->d_name);
if (lstat(fn, &st) < 0)
{
use strict;
use warnings;
-use Config;
use PostgresNode;
use TestLib;
use Test::More tests => 63;
append_to_file "$pgdata/global/pg_internal.init", "foo";
append_to_file "$pgdata/global/pg_internal.init.123", "foo";
-# These are non-postgres macOS files, which should be ignored by the scan.
-# Only perform this test on non-macOS systems though as creating incorrect
-# system files may have side effects on macOS.
-append_to_file "$pgdata/global/.DS_Store", "foo"
- unless ($Config{osname} eq 'darwin');
-
# Enable checksums.
command_ok([ 'pg_checksums', '--enable', '--no-sync', '-D', $pgdata ],
"checksums successfully enabled in cluster");
}
}
- /* Skip macOS system files */
- if (strstr(path, ".DS_Store") != NULL)
- return FILE_ACTION_NONE;
-
/*
* The sscanf tests above can match files that have extra characters at
* the end. To eliminate such cases, cross-check that GetRelationPath
use strict;
use warnings;
-use Config;
use TestLib;
use Test::More tests => 5;
append_to_file
"$test_standby_datadir/tst_standby_dir/standby_subdir/standby_file3",
"in standby3";
- # Skip testing .DS_Store files on macOS to avoid risk of side effects
- append_to_file
- "$test_standby_datadir/tst_standby_dir/.DS_Store",
- "macOS system file" unless ($Config{osname} eq 'darwin');
mkdir "$test_master_datadir/tst_master_dir";
append_to_file "$test_master_datadir/tst_master_dir/master_file1",