Fix calculation of PREDICATELOCK_MANAGER_LWLOCK_OFFSET.
Fix calculation of PREDICATELOCK_MANAGER_LWLOCK_OFFSET.

Commit ea9df812d8502fff74e7bc37d61bdc7d66d77a7f failed to include
NUM_BUFFER_PARTITIONS in this offset, resulting in a bad offset.
Ultimately this threw off NUM_FIXED_LWLOCKS which is based on
earlier offsets, leading to memory allocation problems.  It seems
likely to have also caused increased LWLOCK contention when
serializable transactions were used, because lightweight locks used
for that overlapped others.

Reported by Amit Kapila with analysis and fix.
Backpatch to 9.4, where the bug was introduced.

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