| From: | Thomas Munro <tmunro(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: More tar portability adjustments. |
| Date: | 2026-04-04 01:02:21 |
| Message-ID: | E1w8pP3-002psb-01@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
More tar portability adjustments.
For the three implementations that have caused problems so far:
* GNU and BSD (libarchive) tar both understand --format=ustar
* ustar doesn't support large UID/GID values, so set them to 0 to
avoid a hard error from at least GNU tar
* OpenBSD tar needs -F ustar, and it appears to warn but carry
on with "nobody" if a UID is too large
* -f /dev/null is a more portable way to throw away the output, since
the default destination might be a tape device depending on build
options that a distribution might change
* Windows ships BSD tar but lacks /dev/null, so ask perl for its name
Based on their manuals, the other two implementations the tests are
likely to encounter in the wild don't seem to need any special handling:
* Solaris/illumos tar uses ustar and replaces large UIDs with 60001
* AIX tar uses ustar (unless --format=pax) and truncates large UIDs
Backpatch-through: 18
Co-authored-by: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Co-authored-by: Sami Imseih <samimseih(at)gmail(dot)com> (large UIDs)
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> (earlier version)
Reviewed-by: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> (OpenBSD)
Reviewed-by: Andrew Dunstan <andrew(at)dunslane(dot)net> (Windows)
Discussion: https://postgr.es/m/3676229.1775170250%40sss.pgh.pa.us
Discussion: https://postgr.es/m/CAA5RZ0tt89MgNi4-0F4onH%2B-TFSsysFjMM-tBc6aXbuQv5xBXw%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bab656bb87b0ffed92407f93d0d4a9e4d18c0c5c
Modified Files
--------------
src/test/perl/PostgreSQL/Test/Utils.pm | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Munro | 2026-04-04 01:02:39 | pgsql: More tar portability adjustments. |
| Previous Message | Heikki Linnakangas | 2026-04-03 23:57:54 | pgsql: Remove HASH_DIRSIZE, always use the default algorithm to select |