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

Commit138da72

Browse files
committed
Improve description of some WAL records for GIN
The following information is added in the description of some GINrecords:- In INSERT_LISTPAGE, the number of tuples and the right link block.- In UPDATE_META_PAGE, the number of tuples, the previous tail block,and the right link block.- In SPLIT, the left and right children blocks.Author: Kirill Reshke <reshkekirill@gmail.com>Reviewed-by: Michael Paquier <michael@paquier.xyz>Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru>Discussion:https://postgr.es/m/CALdSSPgnAt5L=D_xGXRXLYO5FK1H31_eYEESxdU1n-r4g+6GqA@mail.gmail.com
1 parentb71bae4 commit138da72

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

‎src/backend/access/rmgrdesc/gindesc.c‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ gin_desc(StringInfo buf, XLogReaderState *record)
130130
appendStringInfo(buf," isdata: %c isleaf: %c",
131131
(xlrec->flags&GIN_INSERT_ISDATA) ?'T' :'F',
132132
(xlrec->flags&GIN_INSERT_ISLEAF) ?'T' :'F');
133+
if (xlrec->leftChildBlkno!=InvalidBlockNumber)
134+
appendStringInfo(buf," children: %u/%u",
135+
xlrec->leftChildBlkno,xlrec->rightChildBlkno);
133136
}
134137
break;
135138
caseXLOG_GIN_VACUUM_PAGE:
@@ -150,10 +153,27 @@ gin_desc(StringInfo buf, XLogReaderState *record)
150153
/* no further information */
151154
break;
152155
caseXLOG_GIN_UPDATE_META_PAGE:
153-
/* no further information */
156+
{
157+
ginxlogUpdateMeta*xlrec= (ginxlogUpdateMeta*)rec;
158+
159+
appendStringInfo(buf,"ntuples: %d",xlrec->ntuples);
160+
if (xlrec->prevTail!=InvalidBlockNumber)
161+
appendStringInfo(buf," prevTail: %u",
162+
xlrec->prevTail);
163+
if (xlrec->newRightlink!=InvalidBlockNumber)
164+
appendStringInfo(buf," newRightLink: %u",
165+
xlrec->newRightlink);
166+
}
154167
break;
155168
caseXLOG_GIN_INSERT_LISTPAGE:
156-
/* no further information */
169+
{
170+
ginxlogInsertListPage*xlrec= (ginxlogInsertListPage*)rec;
171+
172+
appendStringInfo(buf,"ntuples: %d",xlrec->ntuples);
173+
if (xlrec->rightlink!=InvalidBlockNumber)
174+
appendStringInfo(buf," rightlink: %u",
175+
xlrec->rightlink);
176+
}
157177
break;
158178
caseXLOG_GIN_DELETE_LISTPAGE:
159179
appendStringInfo(buf,"ndeleted: %d",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp