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

Commitdc5b3bd

Browse files
committed
pageinspect: Fix memory context allocation of page in brin_revmap_data()
This caused the function to fail, as the aligned copy of the raw pagegiven by the function caller was not saved in the correct memorycontext, which needs to be multi_call_memory_ctx in this case.Issue introduced by076f4d9.Per buildfarm members sifika, mylodon and longfin. I have reproducedthat locally with macos.Discussion:https://postgr.es/m/YjFPOtfCW6yLXUeM@paquier.xyzBackpatch-through: 10
1 parentea70f69 commitdc5b3bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎contrib/pageinspect/brinfuncs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,15 +383,15 @@ brin_revmap_data(PG_FUNCTION_ARGS)
383383
MemoryContextmctx;
384384
Pagepage;
385385

386-
/* minimally verify the page we got */
387-
page=verify_brin_page(raw_page,BRIN_PAGETYPE_REVMAP,"revmap");
388-
389386
/* create a function context for cross-call persistence */
390387
fctx=SRF_FIRSTCALL_INIT();
391388

392389
/* switch to memory context appropriate for multiple function calls */
393390
mctx=MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
394391

392+
/* minimally verify the page we got */
393+
page=verify_brin_page(raw_page,BRIN_PAGETYPE_REVMAP,"revmap");
394+
395395
state=palloc(sizeof(*state));
396396
state->tids= ((RevmapContents*)PageGetContents(page))->rm_tids;
397397
state->idx=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp