From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: ALTER TABLESPACE MOVE command tag tweak |
Date: | 2014-06-13 21:36:52 |
Message-ID: | 11731.1402695412@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> The problem in this particular case is that TABLESPACE is a "global"
> object, thus not supported; but ALTER TABLESPACE MOVE is a command that
> modifies tables (which *are* supported), not tablespaces.
> ALTER TABLESPACE MOVE is a glorified ALTER TABLE. If ALTER TABLESPACE
> MOVE returned ALTER TABLE as a tag, I think it'd work well too; but not
> ALTER TABLESPACE. Individually, since the implementation works by
> calling AlterTableInternal(), it already works.
> Now if you state that the current design in event_triggers that works by
> slicing CommandTag and comparing the pieces is broken, I don't disagree
> and I think I have now (in the patch posted in a nearby thread) some
> more infrastructure to do it differently. But even if we do that, I
> think we're going to need a way to differentiate ALTER TABLESPACE MOVE
> from other forms of ALTER TABLESPACE. I haven't given this much
> thought, though.
Yeah, I'd not paid much attention to it either. Now that I look at it,
ALTER TABLESPACE MOVE seems like a pretty unfortunate choice of naming
all around, because (unless I'm misunderstanding) it doesn't actually
alter any property of the tablespace itself. It might be a bit late
to propose this, but I wonder if some syntax along the lines of
MOVE ALL [ TABLES | INDEXES | ... ] IN TABLESPACE foo TO bar
wouldn't be less confusing. Not sure what we'd use as command tag
for it though (not MOVE, since that's taken).
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2014-06-14 00:10:07 | Re: Something flaky in the "relfilenode mapping" infrastructure |
Previous Message | Alvaro Herrera | 2014-06-13 21:05:51 | Re: ALTER TABLESPACE MOVE command tag tweak |