* as a service.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/copydir.c,v 1.23.2.2 2010/02/16 00:01:35 stark Exp $
+ * $PostgreSQL: pgsql/src/port/copydir.c,v 1.23.2.3 2010/07/01 20:13:06 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
#include <sys/stat.h>
#include "storage/fd.h"
+#include "miscadmin.h"
/*
* On Windows, call non-macro versions of palloc; we can't reference
{
struct stat fst;
+ /* If we got a cancel signal during the copy of the directory, quit */
+ CHECK_FOR_INTERRUPTS();
+
if (strcmp(xlde->d_name, ".") == 0 ||
strcmp(xlde->d_name, "..") == 0)
continue;
*/
for (;;)
{
+ /* If we got a cancel signal during the copy of the file, quit */
+ CHECK_FOR_INTERRUPTS();
+
nbytes = read(srcfd, buffer, COPY_BUF_SIZE);
if (nbytes < 0)
ereport(ERROR,