aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/relcache.c
diff options
context:
space:
mode:
authorHiroshi Inoue <inoue@tpf.co.jp>1999-11-04 08:01:09 +0000
committerHiroshi Inoue <inoue@tpf.co.jp>1999-11-04 08:01:09 +0000
commit2e2189a568e551e97180a8575bdbe320b3947b34 (patch)
tree0932a058fad004c0d5b699e15d0d1f66a01be52f /src/backend/utils/cache/relcache.c
parenta2c834f709e6841a1eef360f40448167b6f58208 (diff)
downloadpostgresql-2e2189a568e551e97180a8575bdbe320b3947b34.tar.gz
postgresql-2e2189a568e551e97180a8575bdbe320b3947b34.zip
Make it possible to execute crashed CREATE/DROP commands again.
Now indexes of pg_class and pg_type are unique indexes and guarantee the uniqueness of correponding attributes. heap_create() was changed to take another boolean parameter which allows to postpone the creation of disk file. The name of rd_nonameunlinked was changed to rd_unlinked. It is used generally(not only for noname relations) now. Requires initdb.
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r--src/backend/utils/cache/relcache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index fab04036d2e..0090c826149 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.74 1999/10/03 23:55:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.75 1999/11/04 08:00:59 inoue Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1065,7 +1065,7 @@ RelationIdCacheGetRelation(Oid relationId)
if (rd->rd_fd == -1)
{
rd->rd_fd = smgropen(DEFAULT_SMGR, rd);
- Assert(rd->rd_fd != -1);
+ Assert(rd->rd_fd != -1 || rd->rd_unlinked);
}
RelationIncrementReferenceCount(rd);
@@ -1099,7 +1099,7 @@ RelationNameCacheGetRelation(char *relationName)
if (rd->rd_fd == -1)
{
rd->rd_fd = smgropen(DEFAULT_SMGR, rd);
- Assert(rd->rd_fd != -1);
+ Assert(rd->rd_fd != -1 || rd->rd_unlinked);
}
RelationIncrementReferenceCount(rd);
@@ -1613,10 +1613,10 @@ RelationPurgeLocalRelation(bool xactCommitted)
*/
if (reln->rd_isnoname)
{
- if (!(reln->rd_nonameunlinked))
+ if (!(reln->rd_unlinked))
{
smgrunlink(DEFAULT_SMGR, reln);
- reln->rd_nonameunlinked = TRUE;
+ reln->rd_unlinked = TRUE;
}
}
else