1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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.
This commit is contained in:
Hiroshi Inoue
1999-11-04 08:01:09 +00:00
parent a2c834f709
commit 2e2189a568
14 changed files with 156 additions and 58 deletions

View File

@ -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