| From: | Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Cc: | Robert Haas <robert(dot)haas(at)enterprisedb(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
| Subject: | Shmem queue is not flushed if receiver is not yet attached |
| Date: | 2022-03-17 07:12:58 |
| Message-ID: | CABOikdPkwtLLCTnzzmpSMXo3QZa2yXq0J7Q61ssdLFAJYrOVvQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello,
While testing on the current PG master, I noticed a problem between
backends communicating over a shared memory queue. I think `shm_mq_sendv()`
fails to flush the queue, even if `force_flush` is set to true, if the
receiver is not yet attached to the queue. This simple fix solves
the problem for me.
On another note, `shm_mq.h` declares `shm_mq_flush()`, but I don't see it
being implemented. Maybe just a leftover from the previous work? Though it
seems useful to implement that API.
Thanks,
Pavan
--
Pavan Deolasee
EnterpriseDB: https://www.enterprisedb..com
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Flush-the-queue-even-if-receiver-has-not-attached.patch | application/octet-stream | 1.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2022-03-17 07:22:14 | Re: Out-of-tree certificate interferes ssltest |
| Previous Message | osumi.takamichi@fujitsu.com | 2022-03-17 07:09:29 | RE: Skipping logical replication transactions on subscriber side |