From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Cannot cancel the change of a tablespace |
Date: | 2010-06-23 12:19:40 |
Message-ID: | AANLkTinpg959nC_iuC7YJzoKK4KolTc60rcw_2DWeoC4@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jun 21, 2010 at 12:46 PM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info> wrote:
> Today, I tried to cancel the change of a tablespace for a table (ALTER
> TABLE ... SET TABLESPACE). I got the "Cancel request sent" but the query
> continued and finally succeed. It was a big issue for my customer, and I
> wanted to look more into that issue. So, I got a look at the source code
> and found we didn't check for interrupts in this part of the code. I
> added them, and it seems to work as I wanted.
>
> 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.
>
> Not sure we really want that change, and it don't feel like a bug to me.
> Should I add it to to the next commitfest?
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.
I think that whatever portion of this we end up applying should be back-patched.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | gabrielle | 2010-06-23 13:17:51 | Re: Explicit psqlrc |
Previous Message | Robert Haas | 2010-06-23 11:17:12 | Re: testing plpython3u on 9.0beta2 |