diff options
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r-- | src/backend/utils/cache/relcache.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 4e3f28491b7..dfb13876de0 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.1.1.1 1996/07/09 06:22:06 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.1.1.1.2.1 1996/10/24 07:38:22 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -1412,7 +1412,14 @@ RelationPurgeLocalRelation(bool xactCommitted) * remove the file if we abort. This is so that files for * tables created inside a transaction block get removed. */ - smgrunlink(reln->rd_rel->relsmgr, reln); + if(reln->rd_istemp) { + if(!(reln->rd_tmpunlinked)) { + smgrunlink(reln->rd_rel->relsmgr, reln); + reln->rd_tmpunlinked = TRUE; + } + } else { + smgrunlink(reln->rd_rel->relsmgr, reln); + } } reln->rd_islocal = FALSE; |