Improve error detection and recovery in lo_import()/lo_export(). Problems noted while experimenting with new control-C code for psql.
Improve error detection and recovery in lo_import()/lo_export().
Problems noted while experimenting with new control-C code for psql.

greenplum-db/gpdb,kaknikhil/gpdb,xuegang/gpdb,50wu/gpdb,edespino/gpdb,cjcjameson/gpdb,xinzweb/gpdb,Chibin/gpdb,royc1/gpdb,xinzweb/gpdb,lpetrov-pivotal/gpdb,oberstet/postgres-xl,lpetrov-pivotal/gpdb,lpetrov-pivotal/gpdb,edespino/gpdb,pavanvd/postgres-xl,Chibin/gpdb,Postgres-XL/Postgres-XL,randomtask1155/gpdb,oberstet/postgres-xl,jmcatamney/gpdb,tpostgres-projects/tPostgres,chrishajas/gpdb,lintzc/gpdb,xuegang/gpdb,edespino/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,Chibin/gpdb,xinzweb/gpdb,cjcjameson/gpdb,royc1/gpdb,ovr/postgres-xl,zeroae/postgres-xl,postmind-net/postgres-xl,atris/gpdb,lintzc/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,zeroae/postgres-xl,pavanvd/postgres-xl,xuegang/gpdb,lintzc/gpdb,greenplum-db/gpdb,janebeckman/gpdb,snaga/postgres-xl,lintzc/gpdb,tangp3/gpdb,Quikling/gpdb,edespino/gpdb,arcivanov/postgres-xl,kmjungersen/PostgresXL,postmind-net/postgres-xl,janebeckman/gpdb,ahachete/gpdb,CraigHarris/gpdb,Quikling/gpdb,Chibin/gpdb,atris/gpdb,xinzweb/gpdb,chrishajas/gpdb,Postgres-XL/Postgres-XL,edespino/gpdb,rubikloud/gpdb,janebeckman/gpdb,CraigHarris/gpdb,tangp3/gpdb,Postgres-XL/Postgres-XL,lintzc/gpdb,foyzur/gpdb,kaknikhil/gpdb,techdragon/Postgres-XL,kaknikhil/gpdb,50wu/gpdb,greenplum-db/gpdb,yazun/postgres-xl,rubikloud/gpdb,ashwinstar/gpdb,kmjungersen/PostgresXL,arcivanov/postgres-xl,ashwinstar/gpdb,tpostgres-projects/tPostgres,zaksoup/gpdb,tpostgres-projects/tPostgres,zaksoup/gpdb,greenplum-db/gpdb,rvs/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,postmind-net/postgres-xl,zeroae/postgres-xl,lisakowen/gpdb,pavanvd/postgres-xl,rvs/gpdb,Quikling/gpdb,royc1/gpdb,kaknikhil/gpdb,chrishajas/gpdb,0x0FFF/gpdb,kaknikhil/gpdb,chrishajas/gpdb,ahachete/gpdb,ovr/postgres-xl,randomtask1155/gpdb,rubikloud/gpdb,xuegang/gpdb,janebeckman/gpdb,rvs/gpdb,tangp3/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,CraigHarris/gpdb,CraigHarris/gpdb,0x0FFF/gpdb,Quikling/gpdb,foyzur/gpdb,50wu/gpdb,lintzc/gpdb,foyzur/gpdb,xuegang/gpdb,ovr/postgres-xl,ahachete/gpdb,pavanvd/postgres-xl,techdragon/Postgres-XL,kmjungersen/PostgresXL,adam8157/gpdb,rvs/gpdb,atris/gpdb,xinzweb/gpdb,xinzweb/gpdb,kaknikhil/gpdb,snaga/postgres-xl,0x0FFF/gpdb,janebeckman/gpdb,kmjungersen/PostgresXL,ahachete/gpdb,atris/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,ahachete/gpdb,tangp3/gpdb,chrishajas/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,lintzc/gpdb,xinzweb/gpdb,royc1/gpdb,zeroae/postgres-xl,janebeckman/gpdb,CraigHarris/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,adam8157/gpdb,0x0FFF/gpdb,royc1/gpdb,rubikloud/gpdb,snaga/postgres-xl,ashwinstar/gpdb,ahachete/gpdb,xinzweb/gpdb,kaknikhil/gpdb,Chibin/gpdb,adam8157/gpdb,Quikling/gpdb,janebeckman/gpdb,techdragon/Postgres-XL,yuanzhao/gpdb,yazun/postgres-xl,foyzur/gpdb,Quikling/gpdb,atris/gpdb,lpetrov-pivotal/gpdb,jmcatamney/gpdb,edespino/gpdb,foyzur/gpdb,lintzc/gpdb,CraigHarris/gpdb,xuegang/gpdb,snaga/postgres-xl,zaksoup/gpdb,royc1/gpdb,tangp3/gpdb,50wu/gpdb,janebeckman/gpdb,Postgres-XL/Postgres-XL,zaksoup/gpdb,lpetrov-pivotal/gpdb,adam8157/gpdb,Quikling/gpdb,chrishajas/gpdb,jmcatamney/gpdb,randomtask1155/gpdb,kmjungersen/PostgresXL,adam8157/gpdb,ashwinstar/gpdb,adam8157/gpdb,rvs/gpdb,oberstet/postgres-xl,atris/gpdb,kaknikhil/gpdb,Chibin/gpdb,foyzur/gpdb,0x0FFF/gpdb,arcivanov/postgres-xl,kaknikhil/gpdb,edespino/gpdb,yuanzhao/gpdb,lisakowen/gpdb,xuegang/gpdb,lisakowen/gpdb,tpostgres-projects/tPostgres,oberstet/postgres-xl,atris/gpdb,Quikling/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,arcivanov/postgres-xl,chrishajas/gpdb,ashwinstar/gpdb,Postgres-XL/Postgres-XL,royc1/gpdb,CraigHarris/gpdb,tangp3/gpdb,50wu/gpdb,edespino/gpdb,oberstet/postgres-xl,edespino/gpdb,cjcjameson/gpdb,tpostgres-projects/tPostgres,zaksoup/gpdb,rubikloud/gpdb,zaksoup/gpdb,greenplum-db/gpdb,lpetrov-pivotal/gpdb,yuanzhao/gpdb,lpetrov-pivotal/gpdb,adam8157/gpdb,xuegang/gpdb,lpetrov-pivotal/gpdb,ahachete/gpdb,cjcjameson/gpdb,rvs/gpdb,tangp3/gpdb,lisakowen/gpdb,greenplum-db/gpdb,snaga/postgres-xl,postmind-net/postgres-xl,cjcjameson/gpdb,lisakowen/gpdb,Chibin/gpdb,randomtask1155/gpdb,chrishajas/gpdb,janebeckman/gpdb,lintzc/gpdb,kaknikhil/gpdb,ovr/postgres-xl,yazun/postgres-xl,foyzur/gpdb,zaksoup/gpdb,yuanzhao/gpdb,lisakowen/gpdb,ashwinstar/gpdb,yazun/postgres-xl,zeroae/postgres-xl,postmind-net/postgres-xl,ashwinstar/gpdb,CraigHarris/gpdb,Quikling/gpdb,yuanzhao/gpdb,adam8157/gpdb,rvs/gpdb,rvs/gpdb,Chibin/gpdb,Quikling/gpdb,techdragon/Postgres-XL,randomtask1155/gpdb,ahachete/gpdb,0x0FFF/gpdb,50wu/gpdb,randomtask1155/gpdb,lisakowen/gpdb,ovr/postgres-xl,janebeckman/gpdb,yuanzhao/gpdb,atris/gpdb,yuanzhao/gpdb,Chibin/gpdb,royc1/gpdb,randomtask1155/gpdb,jmcatamney/gpdb,yazun/postgres-xl,0x0FFF/gpdb,foyzur/gpdb,rubikloud/gpdb,tangp3/gpdb,rubikloud/gpdb,50wu/gpdb,lisakowen/gpdb,xuegang/gpdb,edespino/gpdb,cjcjameson/gpdb,zaksoup/gpdb,cjcjameson/gpdb,jmcatamney/gpdb,Chibin/gpdb,0x0FFF/gpdb,rvs/gpdb,rubikloud/gpdb,50wu/gpdb,rvs/gpdb,ashwinstar/gpdb,arcivanov/postgres-xl