From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: shm_mq_sendv: Fix flushing bug when receiver not yet attached.
Date: Tue, 31 May 2022 12:53:21 +0000
Message-ID: <E1nw1NB-0021xM-8k@gemulon.postgresql.org> (raw)
shm_mq_sendv: Fix flushing bug when receiver not yet attached.
With the old logic, when the reciever had not yet attached, we would
never call shm_mq_inc_bytes_written(), even if force_flush = true
was specified. That could result in a situation where data that the
sender believes it has sent is never received.
Along the way, remove a useless function prototype for a nonexistent
function from shm_mq.h.
Commit 46846433a03dff4f2e08c8a161e54a842da360d6 introduced these
problems.
Pavan Deolasee, with a few changes by me.
Discussion: https://postgr.es/m/CABOikdPkwtLLCTnzzmpSMXo3QZa2yXq0J7Q61ssdLFAJYrOVvQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f5bfba5413f51b4fa0a7b0dc879d39ae6881d8be
Modified Files
--------------
src/backend/storage/ipc/shm_mq.c | 11 +++++------
src/include/storage/shm_mq.h | 1 -
2 files changed, 5 insertions(+), 7 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org
Subject: Re: pgsql: shm_mq_sendv: Fix flushing bug when receiver not yet attached.
In-Reply-To: <E1nw1NB-0021xM-8k@gemulon.postgresql.org>
References: <E1nw1NB-0021xM-8k@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox