diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-01-10 20:02:24 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-01-10 20:02:24 +0000 |
commit | 0ce4d56924982c04da226bc890033e377d1ef375 (patch) | |
tree | 7bea17dae3daf0483526989590035a52af6db8bc /src/backend/commands/tablecmds.c | |
parent | cc7cd8774a644bfb484ee31320e85764ba68d1e3 (diff) | |
download | postgresql-0ce4d56924982c04da226bc890033e377d1ef375.tar.gz postgresql-0ce4d56924982c04da226bc890033e377d1ef375.zip |
Phase 1 of fix for 'SMgrRelation hashtable corrupted' problem. This
is the minimum required fix. I want to look next at taking advantage of
it by simplifying the message semantics in the shared inval message queue,
but that part can be held over for 8.1 if it turns out too ugly.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 4e19979dbf7..b788db35cbb 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.141 2004/12/31 21:59:41 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.142 2005/01/10 20:02:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -5521,10 +5521,8 @@ ATExecSetTableSpace(Oid tableOid, Oid newTableSpace) copy_relation_data(rel, dstrel); /* schedule unlinking old physical file */ - if (rel->rd_smgr == NULL) - rel->rd_smgr = smgropen(rel->rd_node); + RelationOpenSmgr(rel); smgrscheduleunlink(rel->rd_smgr, rel->rd_istemp); - rel->rd_smgr = NULL; /* * Now drop smgr references. The source was already dropped by |