[uxdb@localhost bin]$ hexdump -C -s 0x6E46F8 -n 58 rec1/instances/1/ux_wal/000000010000000000000001
006e46f8 3a 00 00 00 00 00 00 00 b8 46 6e 01 00 00 00 00 |:…Fn…|
006e4708 01 00 00 00 00 00 00 00 10 08 00 00 c7 94 10 6f |…o|
006e4718 ff 18 00 00 00 00 00 00 00 00 00 e5 91 00 32 02 |…2.|
006e4728 00 00 32 02 00 00 3f 02 00 00 |…2…?..|
006e4732
[uxdb@localhost bin]$
加粗字体位上一条wal日志的LSN地址 0x016E46B8
rmgr: Transaction len (rec/tot): 50/ 50, tx: 571, sno: 2, lsn: 0/016E45F8, prev 0/016E45B8, desc: COMMIT 2021-03-17 10:50:13.770405 CST
rmgr: Heap len (rec/tot): 78/ 78, tx: 572, sno: 2, lsn: 0/016E4630, prev 0/016E45F8, desc: HOT_UPDATE off 9 xmax 572 ; new off 11 xmax 0, blkref #0: rel 1663/13231/16384 blk 0
rmgr: Transaction len (rec/tot): 50/ 50, tx: 572, sno: 2, lsn: 0/016E4680, prev 0/016E4630, desc: COMMIT 2021-03-17 10:50:13.774401 CST
rmgr: Standby len (rec/tot): 58/ 58, tx: 0, sno: 2, lsn: 0/016E46B8, prev 0/016E4680, desc: RUNNING_XACTS nextXid 573 latestCompletedXid 572 oldestRunningXid 573
ux_waldump: FATAL: error in WAL record at 0/16E46B8: invalid record length at 0/16E46F8: wanted 32, got 0
定位分析查看 页头内容:
rmgr: Btree len (rec/tot): 61/ 5541, tx: 562, sno: 2, lsn: 0/016E28D0, prev 0/016E1018, desc: INSERT_LEAF off 120, blkref #0: rel 1663/13231/2674 blk 27 FPW
rmgr: Standby len (rec/tot): 50/ 50, tx: 562, sno: 2, lsn: 0/016E3E78, prev 0/016E28D0, desc: LOCK xid 562 db 13231 rel 16384
ux_waldump: FATAL: error in WAL record at 0/16E3E78: unexpected pageaddr 0/16C8000 in log segment 000000000000000000000001, offset 7225344
7225344 十六进制 0x6E4000
[uxdb@localhost bin]$ hexdump -s 0x6E4000 -n 16 -C rec1/instances/1/ux_wal/000000010000000000000001
006e4000 97 d0 05 00 01 00 00 00 00 80 6c 01 00 00 00 00 |…l…|
006e4010
typedef struct XLogPageHeaderData
{
uint16 xlp_magic; /* magic value for correctness checks /
uint16 xlp_info; / flag bits, see below /
TimeLineID xlp_tli; / TimeLineID of first record on page /
XLogRecPtr xlp_pageaddr; / XLOG address of this page */
/*
* When there is not enough space on current page for whole record, we
* continue on the next page. xlp_rem_len is the number of bytes
* remaining from a previous page.
*
* Note that xl_rem_len includes backup-block data; that is, it tracks
* xl_tot_len not xl_len in the initial header. Also note that the
* continuation data isn't necessarily aligned.
*/
uint32 xlp_rem_len; /* total len of remaining data for record */
} XLogPageHeaderData;
本文记录了UXDB系统中WAL日志的一次异常情况,详细展示了从日志的LSN地址出发,逐步排查并定位问题的过程。通过解析不同类型的WAL记录及其描述,揭示了导致错误的具体原因。
627

被折叠的 条评论
为什么被折叠?



