Re: atomics.h may not be included from frontend code

2018-02-27 Thread Andres Freund
On 2018-02-27 13:43:23 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2018-02-27 10:36:01 -0500, Robert Haas wrote: > >> However, those are presumably rare configurations that many people > >> (including many developers) don't care about. > > > I don't think that's quite true anymore. We e

Re: atomics.h may not be included from frontend code

2018-02-27 Thread Tom Lane
Andres Freund writes: > On 2018-02-27 10:36:01 -0500, Robert Haas wrote: >> However, those are presumably rare configurations that many people >> (including many developers) don't care about. > I don't think that's quite true anymore. We e.g. now rely on 64bit > atomics being emulated on some mac

Re: atomics.h may not be included from frontend code

2018-02-27 Thread Andres Freund
Hi, On 2018-02-27 10:36:01 -0500, Robert Haas wrote: > On Tue, Feb 27, 2018 at 8:49 AM, Aleksander Alekseev > We tried to follow commit messages [1] and discussions [2]. However no matter > how you try to look on this code it's weird. I don't see how that makes the code weird. Not fit for your pu

Re: atomics.h may not be included from frontend code

2018-02-27 Thread Robert Haas
On Tue, Feb 27, 2018 at 8:49 AM, Aleksander Alekseev wrote: > We would like to know whether you share this concern and whether it > would be a good idea to try to refactor the code so that atomics could > be used not only from the backend. I think the concern on the referenced threads was that at

atomics.h may not be included from frontend code

2018-02-27 Thread Aleksander Alekseev
Hello hackers, My colleague Anastasia Lubennikova and I were discussing a weird piece of code in src/include/port/atomics.h: ``` #ifdef FRONTEND #error "atomics.h may not be included from frontend code" #endif ``` We tried to follow commit messages [1] and discussions [2]. However no