Fix a thinko introduced into CountActiveBackends by a recent patch: we should ignore NULL array entries, not non-NULL ones.  This had the effect of disabling commit_delay, and could have caused a crash in the rare race condition the patch was intended to fix.
Fix a thinko introduced into CountActiveBackends by a recent patch:
we should ignore NULL array entries, not non-NULL ones.  This had the
effect of disabling commit_delay, and could have caused a crash in the
rare race condition the patch was intended to fix.

Bug report and diagnosis by Jeff Janes, in bug #4952.

greenplum-db/gpdb,snaga/postgres-xl,lisakowen/gpdb,kmjungersen/PostgresXL,50wu/gpdb,pavanvd/postgres-xl,greenplum-db/gpdb,postmind-net/postgres-xl,adam8157/gpdb,yazun/postgres-xl,postmind-net/postgres-xl,jmcatamney/gpdb,pavanvd/postgres-xl,xinzweb/gpdb,lisakowen/gpdb,tpostgres-projects/tPostgres,Postgres-XL/Postgres-XL,ashwinstar/gpdb,greenplum-db/gpdb,ovr/postgres-xl,arcivanov/postgres-xl,jmcatamney/gpdb,jmcatamney/gpdb,lisakowen/gpdb,arcivanov/postgres-xl,ovr/postgres-xl,kmjungersen/PostgresXL,xinzweb/gpdb,adam8157/gpdb,pavanvd/postgres-xl,adam8157/gpdb,postmind-net/postgres-xl,oberstet/postgres-xl,oberstet/postgres-xl,kmjungersen/PostgresXL,ovr/postgres-xl,techdragon/Postgres-XL,lisakowen/gpdb,Postgres-XL/Postgres-XL,kmjungersen/PostgresXL,snaga/postgres-xl,techdragon/Postgres-XL,50wu/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,yazun/postgres-xl,50wu/gpdb,tpostgres-projects/tPostgres,zeroae/postgres-xl,greenplum-db/gpdb,ovr/postgres-xl,Postgres-XL/Postgres-XL,adam8157/gpdb,jmcatamney/gpdb,pavanvd/postgres-xl,lisakowen/gpdb,snaga/postgres-xl,yazun/postgres-xl,yazun/postgres-xl,xinzweb/gpdb,tpostgres-projects/tPostgres,ashwinstar/gpdb,lisakowen/gpdb,pavanvd/postgres-xl,adam8157/gpdb,jmcatamney/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,greenplum-db/gpdb,snaga/postgres-xl,arcivanov/postgres-xl,greenplum-db/gpdb,xinzweb/gpdb,postmind-net/postgres-xl,50wu/gpdb,arcivanov/postgres-xl,adam8157/gpdb,oberstet/postgres-xl,lisakowen/gpdb,Postgres-XL/Postgres-XL,xinzweb/gpdb,arcivanov/postgres-xl,ashwinstar/gpdb,xinzweb/gpdb,zeroae/postgres-xl,oberstet/postgres-xl,adam8157/gpdb,tpostgres-projects/tPostgres,yazun/postgres-xl,lisakowen/gpdb,postmind-net/postgres-xl,xinzweb/gpdb,ovr/postgres-xl,ashwinstar/gpdb,snaga/postgres-xl,jmcatamney/gpdb,jmcatamney/gpdb,zeroae/postgres-xl,zeroae/postgres-xl,techdragon/Postgres-XL,adam8157/gpdb,kmjungersen/PostgresXL,techdragon/Postgres-XL,50wu/gpdb,ashwinstar/gpdb,xinzweb/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,oberstet/postgres-xl,50wu/gpdb,zeroae/postgres-xl,50wu/gpdb,techdragon/Postgres-XL,tpostgres-projects/tPostgres,greenplum-db/gpdb