From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: shm_mq: Fix detach race condition. |
Date: | 2018-03-05 20:16:18 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
shm_mq: Fix detach race condition.
Commit 34db06ef9a1d7f36391c64293bf1e0ce44a33915 adopted a lock-free
design for shm_mq.c, but it introduced a race condition that could
lose messages. When shm_mq_receive_bytes() detects that the other end
has detached, it must make sure that it has seen the final version of
mq_bytes_written, or it might miss a message sent before detaching.
Thomas Munro
Branch
------
master
Modified Files
--------------
src/backend/storage/ipc/shm_mq.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-03-05 20:37:45 | pgsql: Add infrastructure to support server-version-dependent tab compl |
Previous Message | Fujii Masao | 2018-03-05 17:13:33 | pgsql: Fix pg_rewind to handle relation data files in tablespaces prope |