Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1743778

Browse files
committed
If RelationBuildDesc() fails to open a critical system index, PANIC with
a relevant error message instead of just dumping core. Odd that nobodyreported this before Darren Reed.
1 parent00941ee commit1743778

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/utils/cache/relcache.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.266 2008/01/01 19:45:53 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.267 2008/02/27 17:44:19 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2550,7 +2550,10 @@ RelationCacheInitializePhase2(void)
25502550

25512551
#defineLOAD_CRIT_INDEX(indexoid) \
25522552
do { \
2553-
ird = RelationBuildDesc((indexoid), NULL); \
2553+
ird = RelationBuildDesc(indexoid, NULL); \
2554+
if (ird == NULL) \
2555+
elog(PANIC, "could not open critical system index %u", \
2556+
indexoid); \
25542557
ird->rd_isnailed = true; \
25552558
ird->rd_refcnt = 1; \
25562559
} while (0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp