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

Commit783d8ab

Browse files
committed
Fix behavior with pg_restore -l and compressed dumps
pg_restore -l has always been able to read the TOC data of a dump evenif its binary has no support for compression, for both compressed anduncompressed dumps.5e73a60 has introduced a backward-incompatiblebehavior by switching a warning to a hard error in the code path readingthe header data of a dump, preventing the TOC items to be listed even ifpg_restore -l, with no support for compression, is used on a compresseddump. Most modern systems should have support for zlib, but it can bealso possible that somebody relies on the past behavior when copyingover a dump where binaries are not built with zlib support (most likelysome WIN32 flavors these days, though most environments should providethat).There is no easy way to have a regression test for this pattern, as itrequires a mix of dump/restore commands with different compilationoptions, with and without compression. One possibility I see here wouldbe to have a command-line option that enforces a non-compression checkfor a build that supports compression, but that does not seem worth thecost, either.Reported-by: Justin PryzbyAuthor: Georgios KokolatosDiscussion:https://postgr.es/m/20230125180020.GF22427@telsasoft.com
1 parent3a28d78 commit783d8ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3784,7 +3784,7 @@ ReadHead(ArchiveHandle *AH)
37843784

37853785
#ifndefHAVE_LIBZ
37863786
if (AH->compression_spec.algorithm==PG_COMPRESSION_GZIP)
3787-
pg_fatal("archive is compressed, but this installation does not support compression");
3787+
pg_log_warning("archive is compressed, but this installation does not support compression -- no data will be available");
37883788
#endif
37893789

37903790
if (AH->version >=K_VERS_1_4)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp