Allow ALTER TABLE .. SET TABLESPACE to be interrupted.
authorRobert Haas <[email protected]>
Thu, 1 Jul 2010 14:12:04 +0000 (14:12 +0000)
committerRobert Haas <[email protected]>
Thu, 1 Jul 2010 14:12:04 +0000 (14:12 +0000)
Backpatch to 8.0, where tablespaces were introduced.

Guillaume Lelarge

src/backend/commands/tablecmds.c

index 632c9d8d388e77cd985ff768a39b6db9683c6843..3a899125a62e95f95158f124469d1455e452c3f0 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.288.2.3 2009/12/09 21:58:04 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.288.2.4 2010/07/01 14:12:04 rhaas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -6838,6 +6838,9 @@ copy_relation_data(SMgrRelation src, SMgrRelation dst,
 
        for (blkno = 0; blkno < nblocks; blkno++)
        {
+        /* If we got a cancel signal during the copy of the data, quit */
+        CHECK_FOR_INTERRUPTS();
+        
                smgrread(src, forkNum, blkno, buf);
 
                /* XLOG stuff */