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>
Sat, 23 Sep 2017 14:03:05 +0000 (10:03 -0400)
commit3d7f11a0fabb038ce5c630b87dfadd8b625347fe
treed96289a6135e8409e259238fe79d885de27021f0
parent3571a53345bb4d3d055d8a720e9817038927877e
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