]> granicus.if.org Git - postgresql/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:36:15 +0000 (19:36 -0400)
commite03c6d93bfabc6606a8778b253ae31f2c3ee849d
treee87e50652d342e4142bb60bb602f413c1407dacb
parentf6cfc14e5ad3b8e5309615f8f7d15f55ba238f97
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