]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix pg_file_write() error handling.
authorNoah Misch <noah@leadboat.com>
Sun, 12 Mar 2017 23:35:31 +0000 (19:35 -0400)
committerNoah Misch <noah@leadboat.com>
Sun, 12 Mar 2017 23:35:49 +0000 (19:35 -0400)
commit08c6d42c8c63c62aeaaf71cd6375baef798c5924
treea2e9fb4ada99828eda938a58ac28a524831cfe18
parent8469923f3ea893ee0261a234e2e5136663064d52
Fix pg_file_write() error handling.

Detect fclose() failures; given "ln -s /dev/full $PGDATA/devfull",
"pg_file_write('devfull', 'x', true)" now fails as it should.  Don't
leak a stream when fwrite() fails.  Remove a born-ineffective test that
aimed to skip zero-length writes.  Back-patch to 9.2 (all supported
versions).
contrib/adminpack/adminpack.c