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.
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/3d7f11a0fabb038ce5c630b87dfadd8b625347fe
Modified Files
--------------
src/backend/commands/copy.c | 11 ++++++++++-
src/backend/libpq/be-fsstubs.c | 13 +++++++++++--
2 files changed, 21 insertions(+), 3 deletions(-)