Re: BUG #17288: PSQL bug with COPY command (Windows)
От | Michael Paquier |
---|---|
Тема | Re: BUG #17288: PSQL bug with COPY command (Windows) |
Дата | |
Msg-id | YZiGIxk5F3TT/OJc@paquier.xyz обсуждение исходный текст |
Ответ на | Re: BUG #17288: PSQL bug with COPY command (Windows) (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>) |
Ответы |
Re: BUG #17288: PSQL bug with COPY command (Windows)
|
Список | pgsql-bugs |
On Fri, Nov 19, 2021 at 12:44:14PM +0100, Juan José Santamaría Flecha wrote: > GetFinalPathNameByHandleA() is slower when there is redirection, when there > is no redirection it's similar or faster than GetFileInformationByHandle(), > and that should be the most common case. Yeah, the slight performance impact caused by the redirection does not worry me much, based on the code path of Postgres where this would be called. And that's unlikely going to become a bottleneck anyway as GetFinalPathNameByHandleA() would just be called if we know that we are with stdin, stdout or stderr thanks to the first part of the "if" clause. I like the simplicity behind v4 as it does not interfere with _pgstat64() while dealing with the redirection case, so it should address the concerns from Dmitry anyway (right?). We should really add a comment explaining why this is handled this way though for the case of streams, why the case of the redirection matters, and why we count on a failure of GetFinalPathNameByHandleA(). -- Michael
Вложения
В списке pgsql-bugs по дате отправления: