greenplumn genericdesc 源码

  • 2022-08-18
  • 浏览 (505)

greenplumn genericdesc 代码

文件路径:/src/backend/access/rmgrdesc/genericdesc.c

/*-------------------------------------------------------------------------
 *
 * genericdesc.c
 *	  rmgr descriptor routines for access/transam/generic_xlog.c
 *
 *
 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * src/backend/access/rmgrdesc/genericdesc.c
 *
 *-------------------------------------------------------------------------
 */
#include "postgres.h"

#include "access/generic_xlog.h"
#include "lib/stringinfo.h"
#include "storage/relfilenode.h"

/*
 * Description of generic xlog record: write page regions that this record
 * overrides.
 */
void
generic_desc(StringInfo buf, XLogReaderState *record)
{
	Pointer		ptr = XLogRecGetData(record),
				end = ptr + XLogRecGetDataLen(record);

	while (ptr < end)
	{
		OffsetNumber offset,
					length;

		memcpy(&offset, ptr, sizeof(offset));
		ptr += sizeof(offset);
		memcpy(&length, ptr, sizeof(length));
		ptr += sizeof(length);
		ptr += length;

		if (ptr < end)
			appendStringInfo(buf, "offset %u, length %u; ", offset, length);
		else
			appendStringInfo(buf, "offset %u, length %u", offset, length);
	}

	return;
}

/*
 * Identification of generic xlog record: we don't distinguish any subtypes
 * inside generic xlog records.
 */
const char *
generic_identify(uint8 info)
{
	return "Generic";
}

相关信息

greenplumn 源码目录

相关文章

greenplumn appendonlydesc 源码

greenplumn bitmapdesc 源码

greenplumn brindesc 源码

greenplumn clogdesc 源码

greenplumn committsdesc 源码

greenplumn dbasedesc 源码

greenplumn distributedlogdesc 源码

greenplumn gindesc 源码

greenplumn gistdesc 源码

greenplumn hashdesc 源码

0  赞