From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
Cc: | Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17288: PSQL bug with COPY command (Windows) |
Date: | 2021-11-20 05:22:43 |
Message-ID: | YZiGIxk5F3TT/OJc@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2021-11-20 11:49:20 | BUG #17294: spgist doesn't support varchar, only text type fields. |
Previous Message | Thomas Munro | 2021-11-19 19:35:15 | Re: conchuela timeouts since 2021-10-09 system upgrade |