File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 3636 *
3737 *
3838 * IDENTIFICATION
39- * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.92 2007/09/10 17:58:45 alvherre Exp $
39+ * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.93 2007/09/10 21:40:03 alvherre Exp $
4040 *
4141 *-------------------------------------------------------------------------
4242 */
@@ -802,6 +802,9 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
802802 */
803803 RelationTruncate (onerel , new_rel_pages );
804804
805+ /* Now we're OK to release the lock. */
806+ UnlockRelation (onerel , AccessExclusiveLock );
807+
805808 /*
806809 * Drop free-space info for removed blocks; these must not get entered
807810 * into the FSM!
@@ -834,10 +837,6 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
834837 vacrelstats -> rel_pages = new_rel_pages ;
835838 vacrelstats -> pages_removed = old_rel_pages - new_rel_pages ;
836839
837- /*
838- * We keep the exclusive lock until commit (perhaps not necessary)?
839- */
840-
841840 ereport (elevel ,
842841 (errmsg ("\"%s\": truncated %u to %u pages" ,
843842 RelationGetRelationName (onerel ),
You can’t perform that action at this time.
0 commit comments