mirror of
https://github.com/postgres/postgres.git
synced 2025-07-21 16:02:15 +03:00
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
This commit is contained in:
@ -313,10 +313,10 @@ hash_page_items(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
fctx = SRF_FIRSTCALL_INIT();
|
fctx = SRF_FIRSTCALL_INIT();
|
||||||
|
|
||||||
page = verify_hash_page(raw_page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
|
|
||||||
|
|
||||||
mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
|
mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
|
||||||
|
|
||||||
|
page = verify_hash_page(raw_page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
|
||||||
|
|
||||||
uargs = palloc(sizeof(struct user_args));
|
uargs = palloc(sizeof(struct user_args));
|
||||||
|
|
||||||
uargs->page = page;
|
uargs->page = page;
|
||||||
|
Reference in New Issue
Block a user