Hi, PostgreSQL is not using threads but it is possible to spawn thread in your PostgreSQL extensions. For example, I have used pool of threads in my IMCS extension. But you need to build your extension with -pthread: CUSTOM_COPT = -pthread Also, please take in account that many PostgreSQL functions (even in/out or comparison functions) are not reentrant: them are storing their state in global variables. So you will get race conditions if you are calling such functions from multiple threads. Concerning stack overflow, I think that the most probable reason is trivial infinite recursion. Did you inspect stack trace in debugger? On 21.12.2015 09:21, sri harsha wrote:
|