pgsql: Avoid leaking FDs after an fsync failure.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid leaking FDs after an fsync failure.
Date: 2016-10-02 16:33:54
Message-ID: E1bqji6-0001FS-VA@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid leaking FDs after an fsync failure.

Fixes errors introduced in commit bc34223bc, as detected by Coverity.

In passing, report ENOSPC for a short write while padding a new wal file in
open_walfile, make certain that close_walfile closes walfile in all cases,
and improve a couple of comments.

Michael Paquier and Tom Lane

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/728ceba938dfadb204a4854bb76ae3b11b635401

Modified Files
--------------
src/bin/pg_basebackup/receivelog.c | 56 ++++++++++++++++++++++++++++----------
src/common/file_utils.c | 1 +
2 files changed, 43 insertions(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-10-02 18:31:33 pgsql: Add ALTER EXTENSION ADD/DROP ACCESS METHOD, and use it in pg_upg
Previous Message Michael Paquier 2016-10-02 12:49:48 Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013