Protect checkpoint from MMXLOG record insertion.
Protect checkpoint from MMXLOG record insertion.

Originally, `CheckpointStartLock` prevent any MMXLOG insert between
collecting persistent table objects information
(mmxlog_append_checkpoint_data) through XLogInsert of checkpoint record.

Since `CheckpointStartLock` is removed from upstream, to prevent error
in MMXLOG replay on standby, we have to add protection back.

For the same reason, we used PersistentObjLock in SHARED mode to
prevent any update between mmxlog_append_checkpoint_data and XLogInsert
for checkpoint record.

Here is a broken scenario before this patch:
- Create standby like `gpinitstandby -s localhost -P 12345 -F pg_system:/tmp/standby/ps,fs1:/tmp/standby/fs1`
- Create two connections c1 and c2
- c2:
  - `create tablespace ts1 filespace fs1;`: double check the new folder created under filespace fs1 (`/tmp/standby/fs1`) on standby.
  - `begin;`
  - `drop tablespace ts1;`
- set breakpoint to connection c2 on function: `PersistentTablespace_Dropped`
- c2: `commit;`: At this moment, we are ready to write a XLOG for the tablespace drop, but haven't done so. We will let checkpoint record this extra tablespace.
- Switch to connection c1:
- set breakpoint to connection c1 on function: `getTwoPhasePreparedTransactionData`: This will pause the `checkpoint` right after we collect the persistent objects information for mmxlog.
- for lldb, make sure do `pro hand -p true -s false SIGINT` to pass the signal.
- Switch back to connection c2, and continue from the breakpoint `PersistentTablespace_Dropped`, and let it finish.
- Switch back to connection c1, and let the checkpoint finish.
- Now, check the `/tmp/standby/fs1`, you will see the left behind tablespace which is already deleted from master.

Signed-off-by: Xin Zhang <80ac6425c128040c27b3c6077c824bc26222f5e7@pivotal.io>

xinzweb/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,edespino/gpdb,kaknikhil/gpdb,xinzweb/gpdb,lintzc/gpdb,Quikling/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,edespino/gpdb,janebeckman/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,lintzc/gpdb,adam8157/gpdb,kaknikhil/gpdb,edespino/gpdb,jmcatamney/gpdb,adam8157/gpdb,kaknikhil/gpdb,rvs/gpdb,50wu/gpdb,rvs/gpdb,rvs/gpdb,lintzc/gpdb,Quikling/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,adam8157/gpdb,Quikling/gpdb,Chibin/gpdb,edespino/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,lintzc/gpdb,greenplum-db/gpdb,janebeckman/gpdb,xinzweb/gpdb,cjcjameson/gpdb,janebeckman/gpdb,yuanzhao/gpdb,50wu/gpdb,adam8157/gpdb,ashwinstar/gpdb,lintzc/gpdb,edespino/gpdb,janebeckman/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,janebeckman/gpdb,rvs/gpdb,Quikling/gpdb,lintzc/gpdb,rvs/gpdb,Quikling/gpdb,Chibin/gpdb,edespino/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,50wu/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,Quikling/gpdb,greenplum-db/gpdb,xinzweb/gpdb,Quikling/gpdb,Chibin/gpdb,ashwinstar/gpdb,janebeckman/gpdb,ashwinstar/gpdb,yuanzhao/gpdb,Chibin/gpdb,rvs/gpdb,50wu/gpdb,lintzc/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,xinzweb/gpdb,ashwinstar/gpdb,edespino/gpdb,rvs/gpdb,ashwinstar/gpdb,rvs/gpdb,Chibin/gpdb,adam8157/gpdb,Quikling/gpdb,lisakowen/gpdb,Chibin/gpdb,yuanzhao/gpdb,adam8157/gpdb,lisakowen/gpdb,lisakowen/gpdb,xinzweb/gpdb,rvs/gpdb,lisakowen/gpdb,lisakowen/gpdb,cjcjameson/gpdb,Chibin/gpdb,janebeckman/gpdb,Chibin/gpdb,Quikling/gpdb,kaknikhil/gpdb,xinzweb/gpdb,adam8157/gpdb,edespino/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,rvs/gpdb,Quikling/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,edespino/gpdb,lisakowen/gpdb,cjcjameson/gpdb,Chibin/gpdb,cjcjameson/gpdb,janebeckman/gpdb,lintzc/gpdb,janebeckman/gpdb,50wu/gpdb,Chibin/gpdb,lintzc/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,edespino/gpdb,adam8157/gpdb,50wu/gpdb,janebeckman/gpdb,jmcatamney/gpdb,50wu/gpdb,lisakowen/gpdb,greenplum-db/gpdb