Fix unnecessary degeneration caused by error on commit.
Fix unnecessary degeneration caused by error on commit.

A commit could fail by certain condition including deferred
triggers. If the trigger is related to DML, only the primary fails
because standbys never gets executed such DML in streaming replication
mode. This lead to "kind mismatch error", which causes failover or
session close. This is reported in bug #60, and the reporter claims
that it should not trigger the failover or the session close, rather
continue the session and just report the error on the primary. I think
his complain is fair since in replication mode, such error does not
cause failover or session close. So I make read_kind_from_backend() a
little smarter to not cause failover or session close if only primary
fails on commit in streaming replication mode.

treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres