From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Retry short writes when flushing WAL. |
Date: | 2013-07-01 06:37:56 |
Message-ID: | E1UtXkK-0005fI-Gp@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Retry short writes when flushing WAL.
We don't normally bother retrying when the number of bytes written by
write() is short of what was requested. It is generally assumed that a
write() to disk doesn't return short, unless you run out of disk space.
While writing the WAL, however, it seems prudent to try a bit harder,
because a failure leads to PANIC. The write() is also much larger than most
write()s in the backend (up to wal_buffers), so there's more room for
surprises.
Also retry on EINTR. All signals used in the backend are flagged SA_RESTART
nowadays, so it shouldn't happen, but better to be defensive.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/79ce29c734c6a652b2f7193bda537cff0c8eb8c1
Modified Files
--------------
src/backend/access/transam/xlog.c | 32 ++++++++++++++++++++------------
1 file changed, 20 insertions(+), 12 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2013-07-01 08:01:26 | pgsql: Optimize pglz compressor for small inputs. |
Previous Message | Peter Eisentraut | 2013-06-30 23:54:39 | pgsql: Fix cpluspluscheck in checksum code |