Change ParseConfigFp() so that it doesn't process unused entry of each parameter.
Change ParseConfigFp() so that it doesn't process unused entry of each parameter.

When more than one setting entries of same parameter exist in the
configuration file, PostgreSQL uses only entry appearing last in
configuration file scan. Since the other entries are not used,
ParseConfigFp() doesn't need to process them, but previously it did
that. This problematic behavior caused the configuration file scan
to detect invalid settings of unused entries (e.g., existence of
multiple entries of PGC_POSTMASTER parameter) and log the messages
complaining about them.

This commit changes the configuration file scan so that it processes
only last entry of each parameter.

Note that when multiple entries of same parameter exist both in
postgresql.conf and postgresql.auto.conf, unused entries in
postgresql.conf are still processed only at postmaster startup.

The problem has existed since old version, but a user is more likely
to encounter it since 9.4 where ALTER SYSTEM command was introduced.
So back-patch to 9.4.

Amit Kapila, slightly modified by me. Per report from Christoph Berg.

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