pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Greg Smith <greg@2ndQuadrant.com>
To: pgsql-hackers@postgresql.org
Subject: Re: patch : Allow toast tables to be moved to a different tablespace
Date: Thu, 15 Dec 2011 07:31:51 -0500
Message-ID: <4EE9E8B7.9010804@2ndQuadrant.com> (raw )
In-Reply-To: <CAFEQCbESRGXLE4+tRAnazr8QmBJzfYPwc6GP1Daq0quyuyEpZQ@mail.gmail.com >
References: <4E8F1666.2060409@gmail.com >
<CAJKUy5ix3xb8E_+hLfPvz_n+oYTU36-aMfOVNpC5=4PAf-o_jg@mail.gmail.com >
<CAFEQCbGPrRpV1+bQSQ-v0i-md18rvx6jpyR=TEYt+9sPCfTMYw@mail.gmail.com >
<CAJKUy5iMp-NE=24WSNQt5Npp0SLkPTDkqVz9C8D9y=pdK=eFoQ@mail.gmail.com >
<CAFEQCbH756DyyAPQ1ykh3+b+kE1-EhWRww1WO_x5v38C-uLnUg@mail.gmail.com >
<CAJKUy5itRAtv7A3y7nVKmKe8SZdTU5Q-OsPr4d3ySYqoHkzK1g@mail.gmail.com >
<CAFEQCbGmVoeSVyeh8ZCJKpN+NKH2rgvZq1rMrKjZ+YE7RpM8zw@mail.gmail.com >
<CAJKUy5gYJPR0ETVQQvSf2-mDfdsJU-7XSUVDFN_o4+ZaZtyATg@mail.gmail.com >
<CAFEQCbGEjp6j6-XD4C-vDaAyRHh6aMbH__BWB3kBuT505LXQyw@mail.gmail.com >
<CA+TgmoaJOK6yKMZw8sc5HzRD8hb0bzCV0U4JuNc3XdACmfQCYw@mail.gmail.com >
<CAFEQCbESRGXLE4+tRAnazr8QmBJzfYPwc6GP1Daq0quyuyEpZQ@mail.gmail.com >
On 12/13/2011 12:29 PM, Julien Tachoires wrote:
> 2011/12/13 Robert Haas<robertmhaas@gmail.com>:
>
>> On Tue, Dec 13, 2011 at 12:02 PM, Julien Tachoires<julmon@gmail.com> wrote:
>>
>>> Right, it seems to happen when the destination tablespace is the same
>>> as the database's tbs, because, in this case, relation's tbs is set to
>>> InvalidOid :
>>> src/backend/commands/tablecmds.c line 8342
>>>
>>> + rd_rel->reltablespace = (newTableSpace == MyDatabaseTableSpace) ?
>>> InvalidOid : newTableSpace;
>>>
>>> Why don't just asign newTableSpace value here ?
>>>
>> When a relation is stored in the default tablespace, we always record
>> that in the system catalogs as InvalidOid. Otherwise, if the
>> database's default tablespace were changed, things would break.
>>
> OK, considering that, I don't see any way to handle the case raised by Jaime :(
>
So we have a problem here: there's a case that's messy to handle. And
there's really a large issue hanging over this whole patch, which is
that it needs a better explanation of what exactly it's going to get
used for. Especially if the implementation gets more complicated, we'd
want to see a clear reason to use this feature. And that's not really
clear.
If you can return with an update that perhaps finds a way to work around
this OID issue, please re-submit that. And if you can explain some more
about where you think this feature is useful, more information on that
would be helpful. Since this isn't going to get committed soon, I'm
going to mark it returned with feedback for now.
--
Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
view thread (56+ messages) latest in thread
Message-ID: <4EE9E8B7.9010804@2ndQuadrant.com>
Permalink: ../4EE9E8B7.9010804@2ndQuadrant.com/
Also on: postgresql.org/message-id/4EE9E8B7.9010804@2ndQuadrant.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: greg@2ndQuadrant.com
Subject: Re: patch : Allow toast tables to be moved to a different tablespace
In-Reply-To: <4EE9E8B7.9010804@2ndQuadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox