projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e178e49
)
If RelationBuildDesc() fails to open a critical system index, PANIC with
author
Tom Lane
<
[email protected]
>
Wed, 27 Feb 2008 17:44:41 +0000
(17:44 +0000)
committer
Tom Lane
<
[email protected]
>
Wed, 27 Feb 2008 17:44:41 +0000
(17:44 +0000)
a relevant error message instead of just dumping core. Odd that nobody
reported this before Darren Reed.
src/backend/utils/cache/relcache.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/cache/relcache.c
b/src/backend/utils/cache/relcache.c
index 62d4482574c053b81e240251a13a94bbaa1a309a..04c53673bb88b78f034818a8a865b21c15b1e0c4 100644
(file)
--- a/
src/backend/utils/cache/relcache.c
+++ b/
src/backend/utils/cache/relcache.c
@@
-2239,7
+2239,10
@@
RelationCacheInitializePhase2(void)
#define LOAD_CRIT_INDEX(indexoid) \
do { \
- ird = RelationBuildDesc((indexoid), NULL); \
+ ird = RelationBuildDesc(indexoid, NULL); \
+ if (ird == NULL) \
+ elog(PANIC, "could not open critical system index %u", \
+ indexoid); \
ird->rd_isnailed = true; \
ird->rd_refcnt = 1; \
} while (0)