Re: Performance degradation in commit ac1d794 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Performance degradation in commit ac1d794
Date
Msg-id 20160318185554.c4rlsibrtqqtokp6@alap3.anarazel.de
Whole thread Raw
In response to Re: Performance degradation in commit ac1d794  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 2016-03-18 15:49:51 -0300, Alvaro Herrera wrote:
> 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?

Hm, I guess we could make some more of those use LATCH_USE_WIN32.
There's essentially two axes here a) latch notification method
(self-pipe vs windows events) b) readiness notification (epoll vs poll
vs select vs WaitForMultipleObjects).


> 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.

Good catch. It's even important, some compilers choke on that.


> 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 think it's hard to further reduce the number of ifdefs, but if you
have ideas...


> I hope pgindent doesn't choke on it.

The patch is pgindented (I'd personally never decrease indentation just
to fit a line into 79 chars, as pgindent does...).

Thanks for looking!


Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Password identifiers, protocol aging and SCRAM protocol
Next
From: Robert Haas
Date:
Subject: Re: FIX : teach expression walker about RestrictInfo