Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agzTJ-0003kb-HY for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Mar 2016 18:50:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1agzTJ-00074Q-10 for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Mar 2016 18:50:05 +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 1agzTG-00072t-UR for pgsql-hackers@postgresql.org; Fri, 18 Mar 2016 18:50:03 +0000 Received: from smtp-auth.no-ip.com ([8.23.224.61] helo=out.smtp-auth.no-ip.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1agzTD-0008Lu-4P for pgsql-hackers@postgresql.org; Fri, 18 Mar 2016 18:50:01 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.83.202.40]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 1D032400B56; Fri, 18 Mar 2016 11:49:54 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 5EF8E593; Fri, 18 Mar 2016 15:49:51 -0300 (CLT) Date: Fri, 18 Mar 2016 15:49:51 -0300 From: Alvaro Herrera To: Andres Freund Cc: Robert Haas , Amit Kapila , Tom Lane , =?utf-8?B?0JLQsNGB0LjQu9GM0LXQsiDQlNC80LjRgtGA0LjQuQ==?= , "pgsql-hackers@postgresql.org" Subject: Re: Performance degradation in commit ac1d794 Message-ID: <20160318184951.GA127687@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160318080428.meaaq237dcee4eip@alap3.anarazel.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) 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 Andres Freund wrote: > From 1d444b0855dbf65d66d73beb647b772fff3404c8 Mon Sep 17 00:00:00 2001 > From: Andres Freund > Date: Fri, 18 Mar 2016 00:52:07 -0700 > Subject: [PATCH 4/5] Combine win32 and unix latch implementations. > > Previously latches for windows and unix had been implemented in > different files. The next patch in this series will introduce an > expanded wait infrastructure, keeping the implementation separate would > introduce too much duplication. > > This basically just moves the functions, without too much change. The > reason to keep this separate is that it allows blame to continue working > a little less badly; and to make review a tiny bit easier. This seems a reasonable change, but I think that the use of WIN32 vs. LATCH_USE_WIN32 is pretty confusing. In particular, LATCH_USE_WIN32 isn't actually used for anything ... I suppose we don't care since this is a temporary state of affairs only? In 0005: In latch.c you typedef WaitEventSet, but the typedef already appears in latch.h. You need only declare the struct in latch.c, without typedef'ing. Haven't really reviewed anything here yet, just skimming ATM. Having so many #ifdefs all over the place in this file looks really bad, but I guess there's no way around that because this is very platform-specific. I hope pgindent doesn't choke on it. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers