Fix various bugs in postmaster SIGKILL processing
Fix various bugs in postmaster SIGKILL processing

Clamp the minimum sleep time during immediate shutdown or crash to a
minimum of zero, not a maximum of one second.  The previous code could
result in a negative sleep time, leading to failure in select() calls.

Also, on crash recovery, reset AbortStartTime as soon as SIGKILL is sent
or abort processing has commenced instead of waiting until the startup
process completes.  Reset AbortStartTime as soon as SIGKILL is sent,
too, to avoid doing that repeatedly.

Per trouble report from Jeff Janes on
CAMkU=1xd3=wFqZwwuXPWe4BQs3h1seYo8LV9JtSjW5RodoPxMg@mail.gmail.com

Author: MauMau

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