Fix saving and restoring umask
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 22 Sep 2017 20:50:59 +0000 (16:50 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 22 Sep 2017 21:10:36 +0000 (17:10 -0400)
commitaa6b7b72d9bcf967cbccd378de4bc5cef33d02f9
tree99233d881a9032f8183c3a530b7c451d6f7e049d
parent58ffe141eb37c3f027acd25c1fc6b36513bf9380
Fix saving and restoring umask

In two cases, we set a different umask for some piece of code and
restore it afterwards.  But if the contained code errors out, the umask
is not restored.  So add TRY/CATCH blocks to fix that.
src/backend/commands/copy.c
src/backend/libpq/be-fsstubs.c