mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-03 13:30:38 +00:00
Ignore files left after interrupted unlogged build when comparing pgdir
This commit is contained in:
@@ -4303,23 +4303,22 @@ def check_restored_datadir_content(
|
||||
|
||||
restored_files = list_files_to_compare(restored_dir_path)
|
||||
|
||||
if pgdata_files != restored_files:
|
||||
# filter pg_xact and multixact files which are downloaded on demand
|
||||
# also filter files with zero size which can remain after aborted unlogged build
|
||||
pgdata_files = [
|
||||
f
|
||||
for f in pgdata_files
|
||||
if f in restored_files
|
||||
or (
|
||||
not f.startswith("pg_xact")
|
||||
and not f.startswith("pg_multixact")
|
||||
and f != "./pg_dynshmem"
|
||||
and (
|
||||
not Path(os.path.join(endpoint.pgdata_dir, f)).exists()
|
||||
or os.path.getsize(os.path.join(endpoint.pgdata_dir, f)) != 0
|
||||
)
|
||||
# filter pg_xact and multixact files which are downloaded on demand
|
||||
# also filter files with zero size which can remain after aborted unlogged build
|
||||
pgdata_files = [
|
||||
f
|
||||
for f in pgdata_files
|
||||
if f in restored_files
|
||||
or (
|
||||
not f.startswith("pg_xact")
|
||||
and not f.startswith("pg_multixact")
|
||||
and f != "./pg_dynshmem"
|
||||
and (
|
||||
not Path(os.path.join(endpoint.pgdata_dir, f)).exists()
|
||||
or os.path.getsize(os.path.join(endpoint.pgdata_dir, f)) != 0
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
if ignored_files:
|
||||
pgdata_files = [f for f in pgdata_files if f not in ignored_files]
|
||||
|
||||
Reference in New Issue
Block a user