libpq and multi-threading - Mailing list pgsql-general

From Michael J. Baars
Subject libpq and multi-threading
Date
Msg-id CAMHx2Rs2DmFpWyzqB-YSop=49VuKypoJrpstt_AvBeJS6N3odg@mail.gmail.com
Whole thread Raw
Responses Re: libpq and multi-threading
Re: libpq and multi-threading
List pgsql-general
Hi All,

I have a question about libpq and multi-threading.

In the PostgreSQL documentation (https://www.postgresql.org/docs/15/libpq-threading.html) it says that results can be passed around freely between threads. However, when I try to read the result from the parent thread, the program crashes with a segmentation fault.

I have already tried to set the PostgreSQL 'dynamic_shared_memory_type' configuration option to 'mmap', but this does not help.

Am I doing something wrong? How can I make libpq use mmap to allocate memory that can be read from the parent thread?

Best regards,
Mischa Baars.




pgsql-general by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Compiling postgres for windows with src/tools/msvc.build.bat
Next
From: sujay kadam
Date:
Subject: Regarding SSL Enablement in PostgreSQL Database on different port