mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 09:51:15 +02:00
Revert "Skip .DS_Store files in server side utils"
This reverts commit aeee173d22
.
Per failure reports from the buildfarm.
This commit is contained in:
parent
aeee173d22
commit
99cd749ce2
@ -2842,7 +2842,7 @@ The commands accepted in replication mode are:
|
|||||||
<para>
|
<para>
|
||||||
Files other than regular files and directories, such as symbolic
|
Files other than regular files and directories, such as symbolic
|
||||||
links (other than for the directories listed above) and special
|
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.)
|
in <filename>pg_tblspc</filename> are maintained.)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -832,8 +832,7 @@ PostgreSQL documentation
|
|||||||
The backup will include all files in the data directory and tablespaces,
|
The backup will include all files in the data directory and tablespaces,
|
||||||
including the configuration files and any additional files placed in the
|
including the configuration files and any additional files placed in the
|
||||||
directory by third parties, except certain temporary files managed by
|
directory by third parties, except certain temporary files managed by
|
||||||
PostgreSQL and operating system files. But only regular files and
|
PostgreSQL. But only regular files and directories are copied, except that
|
||||||
directories are copied, except that
|
|
||||||
symbolic links used for tablespaces are preserved. Symbolic links pointing
|
symbolic links used for tablespaces are preserved. Symbolic links pointing
|
||||||
to certain directories known to PostgreSQL are copied as empty directories.
|
to certain directories known to PostgreSQL are copied as empty directories.
|
||||||
Other symbolic links and special device files are skipped.
|
Other symbolic links and special device files are skipped.
|
||||||
|
@ -374,9 +374,8 @@ GRANT EXECUTE ON function pg_catalog.pg_read_binary_file(text, bigint, bigint, b
|
|||||||
<filename>backup_label</filename>,
|
<filename>backup_label</filename>,
|
||||||
<filename>tablespace_map</filename>,
|
<filename>tablespace_map</filename>,
|
||||||
<filename>pg_internal.init</filename>,
|
<filename>pg_internal.init</filename>,
|
||||||
<filename>postmaster.opts</filename>,
|
<filename>postmaster.opts</filename>, and
|
||||||
<filename>postmaster.pid</filename> and
|
<filename>postmaster.pid</filename>, as well as any file or directory
|
||||||
<filename>.DS_Store</filename> as well as any file or directory
|
|
||||||
beginning with <filename>pgsql_tmp</filename>, are omitted.
|
beginning with <filename>pgsql_tmp</filename>, are omitted.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
@ -1272,10 +1272,6 @@ sendDir(const char *path, int basepathlen, bool sizeonly, List *tablespaces,
|
|||||||
strlen(PG_TEMP_FILE_PREFIX)) == 0)
|
strlen(PG_TEMP_FILE_PREFIX)) == 0)
|
||||||
continue;
|
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
|
* Check if the postmaster has signaled us to exit, and abort with an
|
||||||
* error in that case. The error handler further up will call
|
* error in that case. The error handler further up will call
|
||||||
|
@ -76,16 +76,6 @@ foreach my $filename (
|
|||||||
close $file;
|
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
|
# 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
|
# the test to ensure global/pg_internal.init is not copied will return a false
|
||||||
# positive.
|
# positive.
|
||||||
@ -154,12 +144,6 @@ foreach my $filename (
|
|||||||
ok(!-f "$tempdir/backup/$filename", "$filename not copied");
|
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
|
# Unlogged relation forks other than init should not be copied
|
||||||
ok(-f "$tempdir/backup/${baseUnloggedPath}_init",
|
ok(-f "$tempdir/backup/${baseUnloggedPath}_init",
|
||||||
'unlogged init fork in backup');
|
'unlogged init fork in backup');
|
||||||
|
@ -338,10 +338,6 @@ scan_directory(const char *basedir, const char *subdir, bool sizeonly)
|
|||||||
strlen(PG_TEMP_FILES_DIR)) == 0)
|
strlen(PG_TEMP_FILES_DIR)) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Skip macOS system files */
|
|
||||||
if (strcmp(de->d_name, ".DS_Store") == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
snprintf(fn, sizeof(fn), "%s/%s", path, de->d_name);
|
snprintf(fn, sizeof(fn), "%s/%s", path, de->d_name);
|
||||||
if (lstat(fn, &st) < 0)
|
if (lstat(fn, &st) < 0)
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Config;
|
|
||||||
use PostgresNode;
|
use PostgresNode;
|
||||||
use TestLib;
|
use TestLib;
|
||||||
|
|
||||||
@ -115,12 +114,6 @@ append_to_file "$pgdata/global/pgsql_tmp/1.1", "foo";
|
|||||||
append_to_file "$pgdata/global/pg_internal.init", "foo";
|
append_to_file "$pgdata/global/pg_internal.init", "foo";
|
||||||
append_to_file "$pgdata/global/pg_internal.init.123", "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.
|
# Enable checksums.
|
||||||
command_ok([ 'pg_checksums', '--enable', '--no-sync', '-D', $pgdata ],
|
command_ok([ 'pg_checksums', '--enable', '--no-sync', '-D', $pgdata ],
|
||||||
"checksums successfully enabled in cluster");
|
"checksums successfully enabled in cluster");
|
||||||
|
@ -648,10 +648,6 @@ decide_file_action(file_entry_t *entry)
|
|||||||
if (strcmp(path, "global/pg_control") == 0)
|
if (strcmp(path, "global/pg_control") == 0)
|
||||||
return FILE_ACTION_NONE;
|
return FILE_ACTION_NONE;
|
||||||
|
|
||||||
/* Skip macOS system files */
|
|
||||||
if (strstr(path, ".DS_Store") != NULL)
|
|
||||||
return FILE_ACTION_NONE;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remove all files matching the exclusion filters in the target.
|
* Remove all files matching the exclusion filters in the target.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Config;
|
|
||||||
use TestLib;
|
use TestLib;
|
||||||
use Test::More tests => 5;
|
use Test::More tests => 5;
|
||||||
|
|
||||||
@ -54,10 +53,6 @@ sub run_test
|
|||||||
append_to_file
|
append_to_file
|
||||||
"$test_standby_datadir/tst_standby_dir/standby_subdir/standby_file4",
|
"$test_standby_datadir/tst_standby_dir/standby_subdir/standby_file4",
|
||||||
"in standby4";
|
"in standby4";
|
||||||
# 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_primary_datadir/tst_primary_dir";
|
mkdir "$test_primary_datadir/tst_primary_dir";
|
||||||
append_to_file "$test_primary_datadir/tst_primary_dir/primary_file1",
|
append_to_file "$test_primary_datadir/tst_primary_dir/primary_file1",
|
||||||
|
Loading…
Reference in New Issue
Block a user