Fix saving and restoring umask

Peter Eisentraut <peter_e@gmx.net>

Commit: aa6b7b72d9bcf967cbccd378de4bc5cef33d02f9
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2017-09-22T21:10:36Z
Releases: 11.0
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.

Files

PathChange+/−
src/backend/commands/copy.c modified +10 −1
src/backend/libpq/be-fsstubs.c modified +11 −2