|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.130 2001/03/23 04:49:55 momjian Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.131 2001/04/02 23:30:04 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -1125,12 +1125,21 @@ RelationBuildDesc(RelationBuildDescInfo buildinfo,
|
1125 | 1125 | relation->rd_node.relNode=relation->rd_rel->relfilenode;
|
1126 | 1126 |
|
1127 | 1127 | /*
|
1128 |
| - *open the relation and assign the file descriptor returned by the |
| 1128 | + *Open the relation and assign the file descriptor returned by the |
1129 | 1129 | * storage manager code to rd_fd.
|
1130 | 1130 | *
|
| 1131 | + * We do not raise a hard error if we fail to open the relation at this |
| 1132 | + * point. If we did, it would be impossible to drop a relation whose |
| 1133 | + * underlying physical file had disappeared. |
1131 | 1134 | */
|
1132 | 1135 | if (relation->rd_rel->relkind!=RELKIND_VIEW)
|
1133 |
| -relation->rd_fd=smgropen(DEFAULT_SMGR,relation, false); |
| 1136 | +{ |
| 1137 | +relation->rd_fd=smgropen(DEFAULT_SMGR,relation, true); |
| 1138 | +Assert(relation->rd_fd >=-1); |
| 1139 | +if (relation->rd_fd==-1) |
| 1140 | +elog(NOTICE,"RelationBuildDesc: can't open %s: %m", |
| 1141 | +RelationGetRelationName(relation)); |
| 1142 | +} |
1134 | 1143 | else
|
1135 | 1144 | relation->rd_fd=-1;
|
1136 | 1145 |
|
|