Re: [patch] Imporve pqmq - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [patch] Imporve pqmq
Date
Msg-id CA+TgmoY=qp7gqZ9QXtgccX195XHW8Y6u6v80OU6xyFhpCfsPZg@mail.gmail.com
Whole thread Raw
In response to [patch] Imporve pqmq  (Xiaoran Wang <fanfuxiaoran@gmail.com>)
Responses Re: [patch] Imporve pqmq
List pgsql-hackers
On Wed, Aug 7, 2024 at 11:24 PM Xiaoran Wang <fanfuxiaoran@gmail.com> wrote:
>     When I use the 'pqmq' recently, I found some issues, just fix them.
>
>      Allow the param 'dsm_segment *seg' to be NULL in function
>     'pq_redirect_to_shm_mq'. As sometimes the shm_mq is created
>     in shared memory instead of DSM.

Under what circumstances does this happen?

>     Add function 'pq_leave_shm_mq' to allow the process to go
>     back to the previous pq environment.

In the code as it currently exists, a parallel worker never has a
connected client, and it talks to a shm_mq instead. So there's no need
for this. If a backend needs to communicate with both a connected
client and also a shm_mq, it probably should not use pqmq but rather
decide explicitly which messages should be sent to the client and
which to the shm_mq. Otherwise, it seems hard to avoid possible loss
of protocol sync.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Don't overwrite scan key in systable_beginscan()
Next
From: Jeff Davis
Date:
Subject: [18] Fix a few issues with the collation cache