Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit21992dd

Browse files
committed
Fix handling of b-tree reuse WAL records when hot standby is disabled,
and add missing code in btree_desc for them. This fixes the bugwith "tree_redo: unknown op code 208" error reported by Jaime Casanova.
1 parentf9d9b2b commit21992dd

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

‎src/backend/access/nbtree/nbtxlog.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.67 2010/04/22 08:04:24 sriggs Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.68 2010/04/30 06:34:29 heikki Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -954,7 +954,6 @@ btree_redo(XLogRecPtr lsn, XLogRecord *record)
954954
switch (info)
955955
{
956956
caseXLOG_BTREE_DELETE:
957-
958957
/*
959958
* Btree delete records can conflict with standby queries. You
960959
* might think that vacuum records would conflict as well, but
@@ -973,7 +972,6 @@ btree_redo(XLogRecPtr lsn, XLogRecord *record)
973972
break;
974973

975974
caseXLOG_BTREE_REUSE_PAGE:
976-
977975
/*
978976
* Btree reuse page records exist to provide a conflict point
979977
* when we reuse pages in the index via the FSM. That's all it
@@ -1034,6 +1032,9 @@ btree_redo(XLogRecPtr lsn, XLogRecord *record)
10341032
caseXLOG_BTREE_NEWROOT:
10351033
btree_xlog_newroot(lsn,record);
10361034
break;
1035+
caseXLOG_BTREE_REUSE_PAGE:
1036+
/* Handled above before restoring bkp block */
1037+
break;
10371038
default:
10381039
elog(PANIC,"btree_redo: unknown op code %u",info);
10391040
}
@@ -1169,6 +1170,15 @@ btree_desc(StringInfo buf, uint8 xl_info, char *rec)
11691170
xlrec->rootblk,xlrec->level);
11701171
break;
11711172
}
1173+
caseXLOG_BTREE_REUSE_PAGE:
1174+
{
1175+
xl_btree_reuse_page*xlrec= (xl_btree_reuse_page*)rec;
1176+
1177+
appendStringInfo(buf,"reuse_page: rel %u/%u/%u; latestRemovedXid %u",
1178+
xlrec->node.spcNode,xlrec->node.dbNode,
1179+
xlrec->node.relNode,xlrec->latestRemovedXid);
1180+
break;
1181+
}
11721182
default:
11731183
appendStringInfo(buf,"UNKNOWN");
11741184
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp