| From: | Harrison Booth <harrisontbooth(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | [PATCH v1] Fix pg_basebackup long-path test on Windows |
| Date: | 2026-07-26 00:02:22 |
| Message-ID: | CAAH-eSV4BJS7W=qRf7=Hk09XD3NhFOVvvKRjH+Lh0v9e_S=Seg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
PostgreSQL's pg_basebackup TAP test creates a junction from the short
system temporary directory to the build-tree temporary directory on
Windows. It then creates $superlongname through the build-tree side.
On my build, that target path was 253 characters. Perl's mkdir failed
at Windows' default 248-character directory path limit, but the result
was unchecked. The test then failed later with a misleading
CREATE TABLESPACE "directory does not exist" error.
The attached patch creates the directory through the short side of the
junction and checks the result of mkdir.
I tested current master 38afc3dcb25 with Meson 1.11.2 and MSVC 19.44 on
Windows 11 ARM64:
- Native ARM64: the unpatched isolated test failed; the patched test
passed all 149 subtests.
- x64 cross-build with needs_exe_wrapper=false: the unpatched test
failed; the patched test passed all 149 subtests.
The 2023 discussion below addressed a related pg_basebackup long-file
test. I did not find an existing proposal for this unchecked
long-directory creation.
https://www.postgresql.org/message-id/666ac55b-3400-fb2c-2cea-0281bf36a53c%40dunslane.net
Best,
Harrison
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Fix-pg_basebackup-long-path-test-on-Windows.patch | application/octet-stream | 1.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Harrison Booth | 2026-07-26 00:04:00 | Re: Bug and memory leaks with access to file links with long names (Windows, MSVS) |
| Previous Message | Michael Paquier | 2026-07-25 23:36:42 | Re: NULL pointer dereference in syslogger with load_libraries() and -DEXEC_BACKEND at startup |