Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDHPT-0005VS-TS for pgsql-hackers@arkaria.postgresql.org; Sat, 03 Dec 2016 20:59:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cDHPT-0000QC-GO for pgsql-hackers@arkaria.postgresql.org; Sat, 03 Dec 2016 20:59:51 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cDHOb-0000OZ-8a for pgsql-hackers@postgresql.org; Sat, 03 Dec 2016 20:58:57 +0000 Received: from mail-pg0-x22a.google.com ([2607:f8b0:400e:c05::22a]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cDHOU-00041Q-B1 for pgsql-hackers@postgresql.org; Sat, 03 Dec 2016 20:58:55 +0000 Received: by mail-pg0-x22a.google.com with SMTP id 3so120727128pgd.0 for ; Sat, 03 Dec 2016 12:58:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=yQZCN8b/qjUHGb+s9fINYBTxUzBLxTEXAC4G2R9oJ/w=; b=EsiNFaARN/O3c09DerSn1iAxny9hflrkyuLu9mUiBPBYsEqCObJDzD45Zjrq2MwN9V BzqH3cOvD2KwPnkQzAilLEhqLdA9weWqHR6cLYbRfdWcYruSoEhU4qi2T3HHArvaACbJ vjEFAzC4U9Mo5pTqFd1ISNli2t/E15KBLjRmI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=yQZCN8b/qjUHGb+s9fINYBTxUzBLxTEXAC4G2R9oJ/w=; b=g5+30i2IKYPFT2h2z6GbQ5FZvGXZoxZpsTnPDcuFEKaZqrklt5vufTtnUZrDcc0Kpy 46iAOXAIeFPozezkfbygoyIEQzfOVsPSXesjQISJ9sOJm4MhnJsLOm9AQ4/MjLnHkEzO LxbqcDTgvT/XanObNR6cRyfC7PNY/aJfRCz5H2s7YJlB6jk74CAZw7WoLFKUqvfL/G8y oGK/XhBlvHXBcd23KVRqiQUscbVqsImYt9wSMWnTNJaoiSUrlibWQBZV7meAoIFGZViK DX5sKzfhXbVMm7TgD5xa4qIFyUFx4A93Gbz9xksH4ToiTY03Cm+kgDE0hTgVFXUV6azs xDFw== X-Gm-Message-State: AKaTC00wKX+KQ3DPmzFW8NvM0K3MVpMv2L/m553XMyYZH6OEIXd48XzAvXjOCZQDYtQ/MA== X-Received: by 10.98.61.152 with SMTP id x24mr50367451pfj.88.1480798728818; Sat, 03 Dec 2016 12:58:48 -0800 (PST) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id k67sm16776574pfk.69.2016.12.03.12.58.46 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 03 Dec 2016 12:58:47 -0800 (PST) Date: Sat, 3 Dec 2016 15:58:45 -0500 From: Noah Misch To: Christian Ullrich Cc: Michael Paquier , PostgreSQL-development , Andrew Dunstan , Magnus Hagander Subject: Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013 Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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