Prevent interrupts while reporting non-ERROR elog messages.
Prevent interrupts while reporting non-ERROR elog messages.

This should eliminate the risk of recursive entry to syslog(3), which
appears to be the cause of the hang reported in bug #9551 from James
Morton.

Arguably, the real problem here is auth.c's willingness to turn on
ImmediateInterruptOK while executing fairly wide swaths of backend code.
We may well need to work at narrowing the code ranges in which the
authentication_timeout interrupt is enabled.  For the moment, though,
this is a cheap and reasonably noninvasive fix for a field-reported
failure; the other approach would be complex and not necessarily
bug-free itself.

Back-patch to all supported branches.

techdragon/Postgres-XL,ovr/postgres-xl,Postgres-XL/Postgres-XL,adam8157/gpdb,adam8157/gpdb,yazun/postgres-xl,jmcatamney/gpdb,xinzweb/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,ovr/postgres-xl,jmcatamney/gpdb,yazun/postgres-xl,Postgres-XL/Postgres-XL,ashwinstar/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,greenplum-db/gpdb,zeroae/postgres-xl,oberstet/postgres-xl,xinzweb/gpdb,zeroae/postgres-xl,xinzweb/gpdb,techdragon/Postgres-XL,greenplum-db/gpdb,lisakowen/gpdb,yazun/postgres-xl,techdragon/Postgres-XL,zeroae/postgres-xl,lisakowen/gpdb,pavanvd/postgres-xl,greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,lisakowen/gpdb,ashwinstar/gpdb,50wu/gpdb,ashwinstar/gpdb,pavanvd/postgres-xl,xinzweb/gpdb,jmcatamney/gpdb,ovr/postgres-xl,lisakowen/gpdb,pavanvd/postgres-xl,oberstet/postgres-xl,50wu/gpdb,jmcatamney/gpdb,50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,techdragon/Postgres-XL,greenplum-db/gpdb,lisakowen/gpdb,jmcatamney/gpdb,lisakowen/gpdb,xinzweb/gpdb,Postgres-XL/Postgres-XL,techdragon/Postgres-XL,50wu/gpdb,adam8157/gpdb,ashwinstar/gpdb,Postgres-XL/Postgres-XL,adam8157/gpdb,adam8157/gpdb,ovr/postgres-xl,zeroae/postgres-xl,50wu/gpdb,zeroae/postgres-xl,xinzweb/gpdb,xinzweb/gpdb,yazun/postgres-xl,jmcatamney/gpdb,oberstet/postgres-xl,greenplum-db/gpdb,50wu/gpdb,oberstet/postgres-xl,ashwinstar/gpdb,ashwinstar/gpdb,adam8157/gpdb,yazun/postgres-xl,xinzweb/gpdb,50wu/gpdb,ovr/postgres-xl,jmcatamney/gpdb,pavanvd/postgres-xl,oberstet/postgres-xl,50wu/gpdb