Initialize GIN metapage correctly when replaying metapage-update WAL record.
Initialize GIN metapage correctly when replaying metapage-update WAL record.

I broke this with my WAL format refactoring patch. Before that, the metapage
was read from disk, and modified in-place regardless of the LSN. That was
always a bit silly, as there's no need to read the old page version from
disk disk when we're overwriting it anyway. So that was changed in 9.5, but
I failed to add a GinInitPage call to initialize the page-headers correctly.
Usually you wouldn't notice, because the metapage is already in the page
cache and is not zeroed.

One way to reproduce this is to perform a VACUUM on an already vacuumed
table (so that the vacuum has no real work to do), immediately after a
checkpoint, and then perform an immediate shutdown. After recovery, the
page headers of the metapage will be incorrectly all-zeroes.

Reported by Jeff Janes

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