OSDN Git Service
(root)
/
pghintplan
/
pg_hint_plan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cca641f
)
Fix bug #0011, which crushes server on repeated Set hint failures.
author
Shigeru HANADA
<shigeru.hanada@gmail.com>
Mon, 27 Aug 2012 06:27:24 +0000
(15:27 +0900)
committer
Shigeru HANADA
<shigeru.hanada@gmail.com>
Mon, 27 Aug 2012 06:40:38 +0000
(15:40 +0900)
Old implementation copies ErrorData and calls ereport again, but doesn't
flush error state at all. This sequence causes ErrorData stack overflow
and PostgreSQL panics in such situation.
pg_hint_plan.c
patch
|
blob
|
history
diff --git
a/pg_hint_plan.c
b/pg_hint_plan.c
index
2145d3a
..
a75426c
100644
(file)
--- a/
pg_hint_plan.c
+++ b/
pg_hint_plan.c
@@
-1309,6
+1309,7
@@
set_config_option_wrapper(const char *name, const char *value,
ecxt = MemoryContextSwitchTo(ccxt);
errdata = CopyErrorData();
+ FlushErrorState();
ereport(elevel, (errcode(errdata->sqlerrcode),
errmsg("%s", errdata->message),
errdata->detail ? errdetail("%s", errdata->detail) : 0,