Re: pg_dump/pg_restore: Fix stdin/stdout handling of custom format on Win32
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Daniel Watzinger <daniel.watzinger@gmail.com>, Daniel Gustafsson <daniel@yesql.se>, pgsql-hackers@postgresql.org
Date: 2023-03-13T23:40:57Z
Lists: pgsql-hackers
On Mon, Mar 13, 2023 at 05:49:41PM +0100, Juan José Santamaría Flecha wrote: > WFM, making fseek() behaviour more resilient seems like a good improvement > overall. I have not looked in details, but my guess would be to add a win32seek.c similar to win32stat.c with a port of fseek() that's more resilient to the definitions in POSIX. > Should we open a new thread to make that part more visible? Yes, perhaps it makes sense to do so to attract the correct audience, There may be a few things we are missing. When it comes to pg_dump, both fixes are required, still it seems to me that adjusting the fstat() port and the fseek() ports are two different bugs, as they influence different parts of the code base when taken individually (aka this fseek() port for WIN32 would need fstat() to properly detect a pipe, as far as I understand). Meanwhile, I'll go apply and backpatch 0001 to fix the first bug at hand with the fstat() port, if there are no objections. -- Michael
Commits
-
Improve WIN32 port of fstat() to detect more file types
- bbf18fe199c5 14.8 landed
- 69b6032e0d1d 15.3 landed
- 765f5df72691 16.0 landed