Location via proxy:
[ UP ]
[Report a bug]
[Manage cookies]
No cookies
No scripts
No ads
No referrer
Show this form
projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48de935
)
pageinspect: Fix use of wrong memory context by hash_page_items.
author
Robert Haas
<rhaas@postgresql.org>
Fri, 26 Jan 2018 14:51:15 +0000
(09:51 -0500)
committer
Robert Haas
<rhaas@postgresql.org>
Fri, 26 Jan 2018 14:59:14 +0000
(09:59 -0500)
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
contrib/pageinspect/hashfuncs.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pageinspect/hashfuncs.c
b/contrib/pageinspect/hashfuncs.c
index dbe3b6ab0463230fbecd9ec5a7274007a07b369b..778e15dde4936a5bd9ebeb824c8fa1b957f9d84b 100644
(file)
--- a/
contrib/pageinspect/hashfuncs.c
+++ b/
contrib/pageinspect/hashfuncs.c
@@
-313,10
+313,10
@@
hash_page_items(PG_FUNCTION_ARGS)
fctx = SRF_FIRSTCALL_INIT();
- page = verify_hash_page(raw_page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
-
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->page = page;