On Wed, 3 May 2023 at 12:11, Michael J. Baars <
mjbaars1977.pgsql.hack...@gmail.com> wrote:
> The shared common address space is controlled by the clone(2) CLONE_VM
> option. Indeed this results in an environment in which both the parent and
> the child can read / write each other's memory, but dy
On 2023-05-03 06:35:26 -0600, Michael Loftis wrote:
> That is not a thread. Linux man clone right at the start …
>
> “clone, __clone2, clone3 - create a child process”
>
> What you want is pthread_create (or similar)
clone is the system call which is used to create both processes and
threads (in
Hi Michael,
Are pthread_* functions really such an improvement over clone? Does it make
an 'freely passing around' of PGresult objects possible? Like it matters,
process or thread.
We were talking about the documentation and this 'freely passing around'
PGresult object. I just don't think it is a
That is not a thread. Linux man clone right at the start …
“clone, __clone2, clone3 - create a child process”
What you want is pthread_create (or similar)
There’s a bunch of not well documented dragons if you’re trying to treat a
child process as a thread. Use POSIX Threads, as pretty much anyti
Hi Peter,
The shared common address space is controlled by the clone(2) CLONE_VM
option. Indeed this results in an environment in which both the parent and
the child can read / write each other's memory, but dynamic memory being
allocated using malloc(3) from two different threads simulaneously wi
On 2023-05-02 17:43:06 +0200, Michael J. Baars wrote:
> I don't think it is, but let me shed some more light on it.
One possibly quite important information you haven't told us yet is
which OS you use.
Or how you create the threads, how you pass the results around, what
else you are possibly doin
Hi David,
My mistake. Too much fiddling around, but better than no fiddling around.
It appears both sides make mistakes, or does your freely passing around
work better than mine?
On Tue, 2 May 2023, 17:57 David G. Johnston,
wrote:
> On Tue, May 2, 2023 at 2:38 AM Michael J. Baars <
> mjbaars197
On Tue, May 2, 2023 at 2:38 AM Michael J. Baars <
mjbaars1977.pgsql.hack...@gmail.com> wrote:
> I have already tried to set the PostgreSQL 'dynamic_shared_memory_type'
> configuration option to 'mmap', but this does not help.
>
>
Of course it doesn't, that is a server-side configuration.
"Specifi
Hello Laurenz,
I don't think it is, but let me shed some more light on it.
After playing around a little with threads and memory, I now know that the
PGresult is not read-only, it is read-once. The child can only read that
portion of parent memory, that was written before the thread started.
Read
On Tue, 2023-05-02 at 11:38 +0200, Michael J. Baars wrote:
> 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 tr
10 matches
Mail list logo