Re: [PATCH v1] Fix pg_basebackup long-path test on Windows

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Harrison Booth <harrisontbooth(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH v1] Fix pg_basebackup long-path test on Windows
Date: 2026-07-29 11:21:34
Message-ID: 867AF66D-DE6A-4100-9042-5604BB6CB09A@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 26 Jul 2026, at 02:02, Harrison Booth <harrisontbooth(at)gmail(dot)com> wrote:

> 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.

-mkdir "$tempdir/$superlongname";
+mkdir "$real_sys_tempdir/$superlongname"
+ or BAIL_OUT "could not create $real_sys_tempdir/$superlongname";

Shouldn't this include $! to give a hint to the user what the error might be?

--
Daniel Gustafsson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2026-07-29 11:45:14 Re: nbtree backwards scan test coverage
Previous Message Shlok Kyal 2026-07-29 11:17:42 Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server