]> 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:57 +0000 (19:35 -0400)
commitd0e5ac736df074d8334fa5c1e471cbdadfd631a8
tree7c3cf4e2ce4b89301ea65179206d2647356ee594
parent82f3792a4f576a34495c6b65ba103941f0b69f49
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