Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013 - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013
Date
Msg-id CAB7nPqStLLt9k2SQj_gVhRfbCYUpAUz5OFYu2yeVa_x3na2E6w@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013  (Christian Ullrich <chris@chrullrich.net>)
Responses Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013  (Christian Ullrich <chris@chrullrich.net>)
Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Tue, Nov 29, 2016 at 08:45:13PM +0100, Christian Ullrich wrote:
> * Michael Paquier wrote:
>
> > On Wed, Nov 16, 2016 at 12:45 PM, Christian Ullrich
> > <chris@chrullrich.net> wrote:
> >> I also did a debug build with 1+2+4 that came in at 84 μs/iteration.
> >
> > Moved to next CF. Christian, perhaps this patch should have an extra
> > round of reviews?
>
> It is significantly different from the last version, so yes, of course.

Patches 0001 (Cosmetic fixes), 0002 (Remove unnecessary CloseHandle)
and 0003 (support for debug CRTs) look in good shape to me. 0004 (Fix
load race) is 0002 from the previous set, and this change makes sense
in itself.

With 0005 I am seeing a compilation failure: you need to have the
declarations in the _MSC_VER block at the beginning of the routine. It
would be nice to mention in a code comment that this what Noah has
mentioned upthread: if a CRT loads while pgwin32_putenv() is
executing, the newly-loaded CRT will always have the latest value.

Based on that 0006 will need a rebase, nothing huge though.

Removing the caching per the measurements upthread is causing a 1us
regression compared to the full set. Let's do things simple then! This
smells like noise.
--
Michael



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: PSQL commands: \quit_if, \quit_unless
Next
From: Amit Langote
Date:
Subject: Minor correction in alter_table.sgml