]> granicus.if.org Git - postgresql/commitdiff
Allow ALTER TABLE .. SET TABLESPACE to be interrupted.
authorRobert Haas <rhaas@postgresql.org>
Thu, 1 Jul 2010 14:11:42 +0000 (14:11 +0000)
committerRobert Haas <rhaas@postgresql.org>
Thu, 1 Jul 2010 14:11:42 +0000 (14:11 +0000)
Backpatch to 8.0, where tablespaces were introduced.

Guillaume Lelarge

src/backend/commands/tablecmds.c

index 5897619f777ab480b8d391ffcfa444448160d07c..4181c1a1873510d86bda6c2a22c944d5d2d3d08a 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.242.2.5 2009/12/09 21:58:16 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.242.2.6 2010/07/01 14:11:42 rhaas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -5986,6 +5986,9 @@ copy_relation_data(Relation rel, 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, blkno, buf);
 
                /* XLOG stuff */