Skip to content

Commit b0313f9

Browse files
committed
pageinspect: Fix use of wrong memory context by hash_page_items.
This can cause it to produce incorrect output. Report and patch by Masahiko Sawada. Discussion: http://postgr.es/m/CAD21AoBc5Asx7pXdUWu6NqU_g=Ysn95EGL9SMeYhLLduYoO_OA@mail.gmail.com
1 parent c186954 commit b0313f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pageinspect/hashfuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ hash_page_items(PG_FUNCTION_ARGS)
313313

314314
fctx = SRF_FIRSTCALL_INIT();
315315

316-
page = verify_hash_page(raw_page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
317-
318316
mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
319317

318+
page = verify_hash_page(raw_page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
319+
320320
uargs = palloc(sizeof(struct user_args));
321321

322322
uargs->page = page;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy