diff options
author | Robert Haas <rhaas@postgresql.org> | 2018-03-05 15:12:49 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2018-03-05 15:12:49 -0500 |
commit | 42d7074ebb832e511d1edec8091cd474d169eef1 (patch) | |
tree | 8a280a8c71ebe0e82c018230207f8193052925ef /contrib/postgres_fdw/sql/postgres_fdw.sql | |
parent | 2f3e2340cd1b67e91cefdf45e4c915297d1034e2 (diff) | |
download | postgresql-42d7074ebb832e511d1edec8091cd474d169eef1.tar.gz postgresql-42d7074ebb832e511d1edec8091cd474d169eef1.zip |
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
Discussion: https://postgr.es/m/CAEepm%3D2myZ4qxpt1a%3DC%2BwEv3o188K13K3UvD-44FK0SdAzHy%2Bw%40mail.gmail.com
Diffstat (limited to 'contrib/postgres_fdw/sql/postgres_fdw.sql')
0 files changed, 0 insertions, 0 deletions