pgsql: Fix NOTIFY to cope with I/O problems, such as out-of-disk-space. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix NOTIFY to cope with I/O problems, such as out-of-disk-space.
Date
Msg-id E1SkTBm-0002Ds-Si@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix NOTIFY to cope with I/O problems, such as out-of-disk-space.

The LISTEN/NOTIFY subsystem got confused if SimpleLruZeroPage failed,
which would typically happen as a result of a write() failure while
attempting to dump a dirty pg_notify page out of memory.  Subsequently,
all attempts to send more NOTIFY messages would fail with messages like
"Could not read from file "pg_notify/nnnn" at offset nnnnn: Success".
Only restarting the server would clear this condition.  Per reports from
Kevin Grittner and Christoph Berg.

Back-patch to 9.0, where the problem was introduced during the
LISTEN/NOTIFY rewrite.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ae90128dc5f8412c8ce31804bbf0a0f8ab345db1

Modified Files
--------------
src/backend/commands/async.c |   27 ++++++++++++++++++++++-----
1 files changed, 22 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: pg_upgrade: fix off-by-one mistake in snprintf
Next
From: Tom Lane
Date:
Subject: pgsql: Fix NOTIFY to cope with I/O problems, such as out-of-disk-space.