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 matter how you try to look on this code it's weird. Basically it says that atomics are written the way that they can be used from one code and can't be used from another. So if you want to write a cross-platform parallel incremental backup tool (what Anastasia is currently working on) you have to use C++ and std::atomic (since MS doesn't develops C anymore) or write something like: ``` #undef FRONTEND #include <atomics.h> #define FRONTEND ``` 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. [1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4eda0a64705 [2]: https://postgr.es/m/20150806070902.ge12...@awork2.anarazel.de -- Best regards, Aleksander Alekseev
signature.asc
Description: PGP signature