Re: Cannot cancel the change of a tablespace - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cannot cancel the change of a tablespace
Date
Msg-id 27921.1277326440@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cannot cancel the change of a tablespace  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Cannot cancel the change of a tablespace  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Jun 21, 2010 at 12:46 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>> I added a CHECK_FOR_INTERRUPTS call in the copy_relation_data(),
>> copy_dir(), and copy_file() functions. Works for me on ALTER TABLE ...
>> SET TABLESPACE and ALTER DATABASE ... SET TABLESPACE, in 9.0 and 8.4.

> Adding a CHECK_FOR_INTERRUPTS() to copy_relation_data seems like it
> ought to be OK (though I haven't tested), but copydir() is in
> src/port, and I fear that putting CHECK_FOR_INTERRUPTS() in there
> might cause problems.

copydir.c is already backend-specific thanks to all the ereport calls.
If we ever tried to make it usable in frontend code, we could easily
deal with CHECK_FOR_INTERRUPTS() via #ifndef FRONTEND --- changing the
error management would be far more painful.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: ECPG FETCH readahead
Next
From: Tom Lane
Date:
Subject: Re: TCP keepalive support for libpq