Re: Cannot cancel the change of a tablespace

Lists: pgsql-hackers
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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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 Content-Type Size
tbs_interrups_v1.patch text/x-patch 1.9 KB

From: Simon Riggs <simon(at)2ndQuadrant(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-21 22:13:42
Message-ID: 1277158422.32273.3686.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 2010-06-21 at 18:46 +0200, Guillaume Lelarge 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?

Patch looks fine to me. Seems important.

Will apply tomorrow to 9.0, barring objections.

--
Simon Riggs www.2ndQuadrant.com


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
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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-06-23 20:54:00
Message-ID: 27921.1277326440@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, Jun 21, 2010 at 12:46 PM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)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


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-06-23 21:29:29
Message-ID: 4C227CB9.5060103@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Le 23/06/2010 22:54, Tom Lane a écrit :
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Mon, Jun 21, 2010 at 12:46 PM, Guillaume Lelarge
>> <guillaume(at)lelarge(dot)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.
>

I'm not sure I get it right. Do I need to do something on the patch so
that it can get commited?

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


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-06-29 21:51:48
Message-ID: 4C2A6AF4.3030606@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Le 23/06/2010 23:29, Guillaume Lelarge a écrit :
> Le 23/06/2010 22:54, Tom Lane a écrit :
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> On Mon, Jun 21, 2010 at 12:46 PM, Guillaume Lelarge
>>> <guillaume(at)lelarge(dot)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.
>>
>
> I'm not sure I get it right. Do I need to do something on the patch so
> that it can get commited?
>

Still not sure what to do right now for this patch :)

Could it be applied? or should I work on it? (and if yes on the latter,
to do what?)

Thanks.

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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-06-29 22:09:29
Message-ID: 25163.1277849369@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
> Still not sure what to do right now for this patch :)

Put it on the commitfest list, if you didn't already.

regards, tom lane


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-06-30 01:42:06
Message-ID: 201006300142.o5U1g6q12474@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
> > Still not sure what to do right now for this patch :)
>
> Put it on the commitfest list, if you didn't already.

So this is not something we want fixed for 9.0, as indicated by Simon?
I don't see the patch on the commit-fest page yet.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ None of us is going to be here forever. +


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-06-30 02:09:21
Message-ID: AANLkTilA3O6YwA-aTcoPBmltnoQh0Klp7k47FnaitIfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Jun 29, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Tom Lane wrote:
>> Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
>> > Still not sure what to do right now for this patch :)
>>
>> Put it on the commitfest list, if you didn't already.
>
> So this is not something we want fixed for 9.0, as indicated by Simon?
> I don't see the patch on the commit-fest page yet.

I tend to think we should fix it for 9.0, but could be talked out of
it if someone has a compelling argument to make.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-06-30 03:25:35
Message-ID: 319.1277868335@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Jun 29, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>> So this is not something we want fixed for 9.0, as indicated by Simon?
>> I don't see the patch on the commit-fest page yet.

> I tend to think we should fix it for 9.0, but could be talked out of
> it if someone has a compelling argument to make.

Er, maybe I lost count, but I thought you were the one objecting to
the patch.

regards, tom lane


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-06-30 04:53:40
Message-ID: 4C2ACDD4.9070100@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Le 30/06/2010 05:25, Tom Lane a écrit :
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Jun 29, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>> So this is not something we want fixed for 9.0, as indicated by Simon?
>>> I don't see the patch on the commit-fest page yet.
>
>> I tend to think we should fix it for 9.0, but could be talked out of
>> it if someone has a compelling argument to make.
>
> Er, maybe I lost count, but I thought you were the one objecting to
> the patch.
>

You're right. Robert questioned the use of CHECK_FOR_INTERRUPTS() in
code available in the src/port directory. I don't see what issue could
result with this. He also said that whatever would be commited should be
back-patched.

I can still add it for the next commit fest, I just don't want this
patch to get lost. Though I won't be able to do this before getting back
from work.

Thanks.

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


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-06-30 11:23:58
Message-ID: AANLkTikQa5OtNNkcHcmzsrAB428NkvyPX98Bsu7zL3Oi@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Jun 29, 2010 at 11:25 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Jun 29, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>> So this is not something we want fixed for 9.0, as indicated by Simon?
>>> I don't see the patch on the commit-fest page yet.
>
>> I tend to think we should fix it for 9.0, but could be talked out of
>> it if someone has a compelling argument to make.
>
> Er, maybe I lost count, but I thought you were the one objecting to
> the patch.

No, I just wasn't sure whether it was safe. If it's safe, I'm 100% in
favor of applying it and back-patching.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-07-01 09:30:57
Message-ID: 4C2C6051.1060504@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Le 30/06/2010 06:53, Guillaume Lelarge a écrit :
> Le 30/06/2010 05:25, Tom Lane a écrit :
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> On Tue, Jun 29, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>>> So this is not something we want fixed for 9.0, as indicated by Simon?
>>>> I don't see the patch on the commit-fest page yet.
>>
>>> I tend to think we should fix it for 9.0, but could be talked out of
>>> it if someone has a compelling argument to make.
>>
>> Er, maybe I lost count, but I thought you were the one objecting to
>> the patch.
>>
>
> You're right. Robert questioned the use of CHECK_FOR_INTERRUPTS() in
> code available in the src/port directory. I don't see what issue could
> result with this. He also said that whatever would be commited should be
> back-patched.
>
> I can still add it for the next commit fest, I just don't want this
> patch to get lost. Though I won't be able to do this before getting back
> from work.
>

Finally, I added it to the next commit fest. Robert can work on it
before if he wants to (or has the time).

https://commitfest.postgresql.org/action/patch_view?id=331

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


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-07-01 14:18:40
Message-ID: AANLkTimawuU3z-qq5AeB78nwmITfTdwzGmBbULoph164@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jul 1, 2010 at 5:30 AM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info> wrote:
>>>> On Tue, Jun 29, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>>>> So this is not something we want fixed for 9.0, as indicated by Simon?
>>>>> I don't see the patch on the commit-fest page yet.
>
> Finally, I added it to the next commit fest. Robert can work on it
> before if he wants to (or has the time).

I'd been avoiding working on this because Simon had said he was going
to commit it, but I can pick it up. I've committed and back-patched
(to 8.0, as 7.4 does not have tablespaces) the fix for ALTER TABLE ..
SET TABLESPACE. I'll take a look at the rest of it as well.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-07-01 15:54:44
Message-ID: AANLkTikCny_5AgPh8twR8hlxD6rQ9-xs3XPfnRA8RavR@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jul 1, 2010 at 10:18 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Jul 1, 2010 at 5:30 AM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
>>>>> On Tue, Jun 29, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>>>>> So this is not something we want fixed for 9.0, as indicated by Simon?
>>>>>> I don't see the patch on the commit-fest page yet.
>>
>> Finally, I added it to the next commit fest. Robert can work on it
>> before if he wants to (or has the time).
>
> I'd been avoiding working on this because Simon had said he was going
> to commit it, but I can pick it up.  I've committed and back-patched
> (to 8.0, as 7.4 does not have tablespaces) the fix for ALTER TABLE ..
> SET TABLESPACE.  I'll take a look at the rest of it as well.

It looks like we have two reasonable choices here:

- We could backpatch this only to 8.4, where ALTER DATABASE .. SET
TABLESPACE was introduced.

- Or, since this also makes it easier to interrupt CREATE DATABASE new
TEMPLATE = some_big_database, we could back-patch it all the way to
8.1, which is the first release where we use copydir() rather than
invoking cp -r (except on Windows, where copydir() has always been
used, but releases < 8.2 aren't supported on Windows anyway).

Since I can't remember anyone complaining about difficulty
interrupting CREATE DATABASE, I'm inclined to go back only to 8.4, and
will do that a bit later.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-07-01 16:11:54
Message-ID: 4C2CBE4A.3080900@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Le 01/07/2010 17:54, Robert Haas a écrit :
> On Thu, Jul 1, 2010 at 10:18 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Thu, Jul 1, 2010 at 5:30 AM, Guillaume Lelarge
>> <guillaume(at)lelarge(dot)info> wrote:
>>>>>> On Tue, Jun 29, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>>>>>> So this is not something we want fixed for 9.0, as indicated by Simon?
>>>>>>> I don't see the patch on the commit-fest page yet.
>>>
>>> Finally, I added it to the next commit fest. Robert can work on it
>>> before if he wants to (or has the time).
>>
>> I'd been avoiding working on this because Simon had said he was going
>> to commit it, but I can pick it up. I've committed and back-patched
>> (to 8.0, as 7.4 does not have tablespaces) the fix for ALTER TABLE ..
>> SET TABLESPACE. I'll take a look at the rest of it as well.
>
> It looks like we have two reasonable choices here:
>
> - We could backpatch this only to 8.4, where ALTER DATABASE .. SET
> TABLESPACE was introduced.
>
> - Or, since this also makes it easier to interrupt CREATE DATABASE new
> TEMPLATE = some_big_database, we could back-patch it all the way to
> 8.1, which is the first release where we use copydir() rather than
> invoking cp -r (except on Windows, where copydir() has always been
> used, but releases < 8.2 aren't supported on Windows anyway).
>
> Since I can't remember anyone complaining about difficulty
> interrupting CREATE DATABASE, I'm inclined to go back only to 8.4, and
> will do that a bit later.
>

I agree that a backpatch to 8.4 seems enough.

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


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-07-01 20:13:32
Message-ID: AANLkTinsNwQbH830VZGJzheUGC4kURO4L8OfqAh9Pbu7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jul 1, 2010 at 12:11 PM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info> wrote:
> Le 01/07/2010 17:54, Robert Haas a écrit :
>> On Thu, Jul 1, 2010 at 10:18 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> On Thu, Jul 1, 2010 at 5:30 AM, Guillaume Lelarge
>>> <guillaume(at)lelarge(dot)info> wrote:
>>>>>>> On Tue, Jun 29, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>>>>>>> So this is not something we want fixed for 9.0, as indicated by Simon?
>>>>>>>> I don't see the patch on the commit-fest page yet.
>>>>
>>>> Finally, I added it to the next commit fest. Robert can work on it
>>>> before if he wants to (or has the time).
>>>
>>> I'd been avoiding working on this because Simon had said he was going
>>> to commit it, but I can pick it up.  I've committed and back-patched
>>> (to 8.0, as 7.4 does not have tablespaces) the fix for ALTER TABLE ..
>>> SET TABLESPACE.  I'll take a look at the rest of it as well.
>>
>> It looks like we have two reasonable choices here:
>>
>> - We could backpatch this only to 8.4, where ALTER DATABASE .. SET
>> TABLESPACE was introduced.
>>
>> - Or, since this also makes it easier to interrupt CREATE DATABASE new
>> TEMPLATE = some_big_database, we could back-patch it all the way to
>> 8.1, which is the first release where we use copydir() rather than
>> invoking cp -r (except on Windows, where copydir() has always been
>> used, but releases < 8.2 aren't supported on Windows anyway).
>>
>> Since I can't remember anyone complaining about difficulty
>> interrupting CREATE DATABASE, I'm inclined to go back only to 8.4, and
>> will do that a bit later.
>>
>
> I agree that a backpatch to 8.4 seems enough.

Done.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cannot cancel the change of a tablespace
Date: 2010-07-01 22:31:30
Message-ID: 4C2D1742.6020107@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Le 01/07/2010 22:13, Robert Haas a écrit :
> On Thu, Jul 1, 2010 at 12:11 PM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
>> Le 01/07/2010 17:54, Robert Haas a écrit :
>>> On Thu, Jul 1, 2010 at 10:18 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>>> On Thu, Jul 1, 2010 at 5:30 AM, Guillaume Lelarge
>>>> <guillaume(at)lelarge(dot)info> wrote:
>>>>>>>> On Tue, Jun 29, 2010 at 9:42 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>>>>>>>>> So this is not something we want fixed for 9.0, as indicated by Simon?
>>>>>>>>> I don't see the patch on the commit-fest page yet.
>>>>>
>>>>> Finally, I added it to the next commit fest. Robert can work on it
>>>>> before if he wants to (or has the time).
>>>>
>>>> I'd been avoiding working on this because Simon had said he was going
>>>> to commit it, but I can pick it up. I've committed and back-patched
>>>> (to 8.0, as 7.4 does not have tablespaces) the fix for ALTER TABLE ..
>>>> SET TABLESPACE. I'll take a look at the rest of it as well.
>>>
>>> It looks like we have two reasonable choices here:
>>>
>>> - We could backpatch this only to 8.4, where ALTER DATABASE .. SET
>>> TABLESPACE was introduced.
>>>
>>> - Or, since this also makes it easier to interrupt CREATE DATABASE new
>>> TEMPLATE = some_big_database, we could back-patch it all the way to
>>> 8.1, which is the first release where we use copydir() rather than
>>> invoking cp -r (except on Windows, where copydir() has always been
>>> used, but releases < 8.2 aren't supported on Windows anyway).
>>>
>>> Since I can't remember anyone complaining about difficulty
>>> interrupting CREATE DATABASE, I'm inclined to go back only to 8.4, and
>>> will do that a bit later.
>>>
>>
>> I agree that a backpatch to 8.4 seems enough.
>
> Done.
>

Thanks, Robert.

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