The ASTREAMER_ARCHIVE_TRAILER case in astreamer_tar_parser_content() intended to reject tar files whose trailer exceeded 2 blocks. However, the check compared 'len' after astreamer_buffer_bytes() had already consumed all the data and set len to 0, so the pg_fatal() could never fire. Moreover, per the POSIX specification for the ustar format, the last physical block of a tar archive is always full-sized, and "logical records after the two zero logical records may contain undefined data." GNU tar, for example, zero-pads its output to a 10kB boundary by default. So rejecting extra data after the two zero blocks would be wrong even if the check worked. (But if the check had worked, it would have alerted us to the bug just fixed in 9aa1fcc54.) Remove the dead check and update the comment to explain why trailing data is expected and harmless. Per report from Tom Lane. Author: Andrew Dunstan <andrew@dunslane.net> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/2178517.1774064942@sss.pgh.pa.us |
||
|---|---|---|
| .github | ||
| config | ||
| contrib | ||
| doc | ||
| src | ||
| .cirrus.star | ||
| .cirrus.tasks.yml | ||
| .cirrus.yml | ||
| .dir-locals.el | ||
| .editorconfig | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| aclocal.m4 | ||
| configure | ||
| configure.ac | ||
| COPYRIGHT | ||
| GNUmakefile.in | ||
| HISTORY | ||
| Makefile | ||
| meson.build | ||
| meson_options.txt | ||
| README.md | ||
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.