码迷,mamicode.com
首页 > 其他好文 > 详细

WAL

时间:2016-05-30 14:33:14      阅读:228      评论:0      收藏:0      [点我收藏+]

标签:

WAL record format

typedef struct XLogRecord
{
pg_crc32         xl_crc; /* CRC for this record */
XLogRecPtr      xl_prev; /* ptr to previous record in log */
TransactionId   xl_xid; /* xact id */
uint32              xl_tot_len; /* total len of entire record */
uint32              xl_len; /* total len of rmgr data */
uint8                xl_info; /* flag bits, see below */
RmgrId             xl_rmid; /* resource manager for this record */
/* Depending on MAXALIGN, there are either 2 or 6 wasted bytes here */
/* ACTUAL LOG DATA FOLLOWS AT END OF STRUCT */
} XLogRecord;

Tools

• Developer tools
– WAL_DEBUG compile option
– Xlogdump http://xlogviewer.projects.postgresql.org/

PITR tools
– Pglesslog
http://pgfoundry.org/projects/pglesslog/

– Clearxlogtail
http://pgfoundry.org/projects/clearxlogtail

 wal_debug=on

WAL

标签:

原文地址:http://www.cnblogs.com/songyuejie/p/5542191.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!