1

I am a newbie in the database field. Recently I have been trying to install Postgres 9.3.4 on AIX 6.1. When I was building the code with the configure command, I ran into this error:

checking thread safety of required library functions... no
configure: 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.

I am only able to compile successfully after using the -disable-thread-safety option. As such, I would like to know what is the impact of using this option towards the database reliability. What does 'client libraries' mean in terms of using the database with this option?

I would also like to know how to compile the thread_test.c and run it manually. The manual says:
- run "configure"
- compile the main source tree
- compile and run this program

But I haven't been successful in compiling it.

*Edit:
Here are the steps that I took to compile thread_test.c:
1. I first ran configure with the --disable-thread-safety option to get the source tree.
2. Then from the build directory, I ran "gmake" to compile main source tree.
3. When's that's done, I moved into the src/test/thread folder and tried to run "gmake".
I got this error:

`gmake: *** No rule to make target `thread_test.o', needed by `thread_test'.  Stop.

If I run "make", I get many errors like this:

"../../../src/Makefile.global", line 45: make: Dependency line needs colon or double colon operator.<br>
"../../../src/Makefile.global", line 48: make: Dependency line needs colon or double colon operator.<br>
"../../../src/Makefile.global", line 52: make: Dependency line needs colon or double colon operator.<br>
"../../../src/Makefile.global", line 72: make: Dependency line needs colon or double colon operator.<br>
"../../../src/Makefile.global", line 84: make: Dependency line needs colon or double colon operator.<br>
"../../../src/Makefile.global", line 85: make: Dependency line needs colon or double colon operator.<br>
"../../../src/Makefile.global", line 87: make: Dependency line needs colon or double colon operator.<br>
"../../../src/Makefile.global", line 88: make: Dependency line needs colon or double colon operator.<br>
"../../../src/Makefile.global", line 91: make: Dependency line needs colon or double colon operator.<br>
make: Equal sign not found in macro substitution.<br>

I might be doing something wrong here...Can someone be kind enough to point out my mistakes in compiling the src/test/thread/thread_test.c file?

Thanks for all your patience with me. :)

  • Show the exact error message(s) from compiling thread_test – Craig Ringer Jul 31 '14 at 5:33
  • Hi Craig, I have edited the post to show the problems that I faced when trying to compile thread_test.c. Thanks. – evkwan Aug 1 '14 at 2:30
  • You must use GNU make. gmake. – Craig Ringer Aug 1 '14 at 2:43
  • I did use gmake, and I was in the directory of src/test/thread when using the command. This directory already had a Makefile available. I ran into the error described in my post though: gmake: *** No rule to make targetthread_test.o', needed by thread_test'. Stop. – evkwan Aug 1 '14 at 3:00
  • Ah, I missed it because of the formatting. Weird issue. – Craig Ringer Aug 1 '14 at 3:16
2

Disabling thread safety will mean that libpq can't be safely used with multi-threaded applications unless the app is very careful to only interact with it using a single thread.

This isn't a concern for the great majority of apps.

  • Hi Craig, thanks for the reply. Is it accurate to say that I will have to check on how Postgres is being accessed and queried by my program in order to determine if using --disable-thread-safety poses harm or not? – evkwan Aug 1 '14 at 2:47
  • @evkwan Correct. You need to determine if your client app (a) uses threading and (b) might access libpq from more than one thread at once. – Craig Ringer Aug 1 '14 at 3:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.