Skip site navigation (1) Skip section navigation (2)

Cannot cancel the change of a tablespace

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Cannot cancel the change of a tablespace
Date: 2010-06-21 16:46:36
Message-ID: 4C1F976C.4040802@lelarge.info (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackers
Hi,

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?

Comments?


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

Attachment: tbs_interrups_v1.patch
Description: text/x-patch (1.9 KB)

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-06-21 17:03:19
Subject: Re: deprecating =>, take two
Previous:From: Robert HaasDate: 2010-06-21 16:45:01
Subject: Re: beta3 & the open items list

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group