Fix incorrect output from gin_desc().
Fix incorrect output from gin_desc().

Previously gin_desc() displayed incorrect output "unknown action 0"
for XLOG_GIN_INSERT and XLOG_GIN_VACUUM_DATA_LEAF_PAGE records with
valid actions. The cause of this problem was that gin_desc() wrongly
used XLogRecGetData() to extract data from those records.
Since they were registered by XLogRegisterBufData(), gin_desc() should
have used XLogRecGetBlockData(), instead, like gin_redo().
Also there were other differences about how to treat XLOG_GIN_INSERT
record between gin_desc() and gin_redo().

This commit fixes gin_desc() routine so that it treats those records
in the same way as gin_redo().

Batch-patch to 9.5 where WAL record format was revamped and
XLogRegisterBufData() was added.

Reported-By: Andres Freund
Reviewed-By: Tom Lane
Discussion: <321200ab967865732ab16aa66c0ba19a75ae440a@alap3.anarazel.de>

xinzweb/gpdb,50wu/gpdb,adam8157/gpdb,xinzweb/gpdb,xinzweb/gpdb,adam8157/gpdb,adam8157/gpdb,lisakowen/gpdb,50wu/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,xinzweb/gpdb,xinzweb/gpdb,lisakowen/gpdb,greenplum-db/gpdb,lisakowen/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb,lisakowen/gpdb,adam8157/gpdb,adam8157/gpdb,xinzweb/gpdb,xinzweb/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,50wu/gpdb