Anyway, the problem with thread sanitizer is still present. If I try to build libpq v13.3 with thread sanitizer, I get a configuration error like this:
Previous read of size 4 at 0x000000f1744c by thread T1: #0 func_call_1 <null> (conftest+0x4b5d12)
Location is global 'errno2_set' of size 4 at 0x000000f1744c (conftest+0x000000f1744c)
Thread T2 (tid=3413990, running) created by main thread at: #0 pthread_create <null> (conftest+0x424b3b) #1 main <null> (conftest+0x4b5b49)
Thread T1 (tid=3413989, running) created by main thread at: #0 pthread_create <null> (conftest+0x424b3b) #1 main <null> (conftest+0x4b5b2e)
...
configure:18879: result: no configure:18881: error: thread test program failed This platform is not thread-safe. Check the file 'config.log' or compile and run src/test/thread/thread_test for the exact reason. Use --disable-thread-safety to disable thread safety.