Re: pg_basebackup check vs Windows file path limits
Alexander Law <exclusion@gmail.com>
From: Alexander Lakhin <exclusion@gmail.com>
To: Andrew Dunstan <andrew@dunslane.net>, Daniel Gustafsson <daniel@yesql.se>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2023-11-11T17:00:01Z
Lists: pgsql-hackers
11.11.2023 18:18, Andrew Dunstan wrote: > > Hmm, maybe we should be using File::Copy::move() instead of rename(). The docco for that says: > > If possible, move() will simply rename the file. Otherwise, it > copies the file to the new location and deletes the original. If an > error occurs during this copy-and-delete process, you may be left > with a (possibly partial) copy of the file under the destination > name. Unfortunately, I've stumbled upon inability of File::Copy::move() to move directories across filesystems, exactly as described here: https://stackoverflow.com/questions/17628039/filecopy-move-directories-accross-drives-in-windows-not-working (I'm sorry for not looking above rename() where this stated explicitly: # On Windows use the short location to avoid path length issues. # Elsewhere use $tempdir to avoid file system boundary issues with moving. So this issue affects Windows only.) Best regards, Alexander
Commits
-
Skip pg_baseback long filename test if path too long on Windows
- b94d70a632aa 16.0 landed
- 2e99ce68bcd2 11.21 landed
- 2d3983aea5db 12.16 landed
- 9ebe6fdc5c68 13.12 landed
- fb0f05576a0a 14.9 landed
- c0cb12f9e7b3 15.4 landed
- 1fa25ce70f09 17.0 landed