From: Noah Misch <noah@leadboat.com>
To: Christian Ullrich <chris@chrullrich.net>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Magnus Hagander <magnus@hagander.net>
Subject: Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013
Date: Sat, 3 Dec 2016 15:58:45 -0500
Message-ID: <20161203205845.GA3489698@tornado.leadboat.com> (raw)
In-Reply-To: <DB6PR0602MB29818313F0C5DCD2C7C65DDED48C0@DB6PR0602MB2981.eurprd06.prod.outlook.com>
References: <571E6D90.7050903@dunslane.net>
<9d5c6a49-774c-44de-83fc-65c5b431f8d9@chrullrich.net>
<2c5f9472-d0cc-df61-78e3-bc48909ffb59@chrullrich.net>
<784524b2-bd50-1f5e-dad9-f8840f97753a@chrullrich.net>
<20161116072246.GA2297058@tornado.leadboat.com>
<DB6PR0602MB2981431251C29DBAB293A6CAD4BE0@DB6PR0602MB2981.eurprd06.prod.outlook.com>
<CAB7nPqQctCCw+FjAVn72KkPGExEyFmR6R8rAznr6i78Gjw=HPw@mail.gmail.com>
<f8fef181-ef6b-2b9b-7038-23849c9f6a73@chrullrich.net>
<CAB7nPqStLLt9k2SQj_gVhRfbCYUpAUz5OFYu2yeVa_x3na2E6w@mail.gmail.com>
<DB6PR0602MB29818313F0C5DCD2C7C65DDED48C0@DB6PR0602MB2981.eurprd06.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On Wed, Nov 16, 2016 at 08:45:20PM +0000, Christian Ullrich wrote:
> * Noah Misch wrote:
> > I prefer the simplicity of abandoning the cache (patch 4), if it
> > performs decently. Would you compare the performance of patch 1,
> > patches 1+2+3, and patches 1+2+4? This should measure the right
> > thing (after substituting @libdir@ for your environment):
>
> Tested with release builds; Core i7-6700K (quad/HT; 4000 MHz).
> I did three runs each, and they were always within 0.5 % of each
> other's run time.
>
> - patch 1 (now 1-3): 24 μs/iteration (24 s for 1e6)
> - patch 1+2+3 (now 1-5 + 8): 29 μs/iteration
> - patch 1+2+4 (now 1-7): 30 μs/iteration
Thanks for measuring; 6μs*9=54μs is a negligible addition to Windows backend
startup time.
On Wed, Nov 30, 2016 at 04:24:34PM +0000, Christian Ullrich wrote:
> * From: Michael Paquier
> > 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.
>
> I fixed the existing comment by removing the last sentence that is in the wrong place now, but I don't see the point in suddenly starting to explain why it is done this way and not the other.
>
> > Based on that 0006 will need a rebase, nothing huge though.
>
> Done, new revisions attached.
I committed patches 1-7 with some comment changes, a pgindent, and other
cosmetic trivia. (The file was pgindent-clean before this work. Patch 6
still achieved the more-compact formatting you sought.)
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: noah@leadboat.com, chris@chrullrich.net, michael.paquier@gmail.com, pgsql-hackers@postgresql.org, andrew@dunslane.net, magnus@hagander.net
Subject: Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013
In-Reply-To: <20161203205845.GA3489698@tornado.leadboat.com>
References: <571E6D90.7050903@dunslane.net> <9d5c6a49-774c-44de-83fc-65c5b431f8d9@chrullrich.net> <2c5f9472-d0cc-df61-78e3-bc48909ffb59@chrullrich.net> <784524b2-bd50-1f5e-dad9-f8840f97753a@chrullrich.net> <20161116072246.GA2297058@tornado.leadboat.com> <DB6PR0602MB2981431251C29DBAB293A6CAD4BE0@DB6PR0602MB2981.eurprd06.prod.outlook.com> <CAB7nPqQctCCw+FjAVn72KkPGExEyFmR6R8rAznr6i78Gjw=HPw@mail.gmail.com> <f8fef181-ef6b-2b9b-7038-23849c9f6a73@chrullrich.net> <CAB7nPqStLLt9k2SQj_gVhRfbCYUpAUz5OFYu2yeVa_x3na2E6w@mail.gmail.com> <DB6PR0602MB29818313F0C5DCD2C7C65DDED48C0@DB6PR0602MB2981.eurprd06.prod.outlook.com> <20161203205845.GA3489698@tornado.leadboat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox