Re: ALTER TABLESPACE MOVE command tag tweak

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLESPACE MOVE command tag tweak
Date: 2014-06-24 04:17:29
Message-ID: 20140624041729.GF5032@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Noah Misch wrote:

> Concerning the problem that started this thread, I would raise one ALTER TABLE
> event per table and not fire an event for the bulk request as a whole.

Yes, that's how it already works. Essentially, ALTER TABLESPACE MOVE
calls AlterTableInternal, and that function calls one ATExecFoo() for
each table to be moved. What my code does is set up "AT event
collection" when ALTER TABLESPACE MOVE is called, and then for each
ATExecFoo() is executed, one event is added to a queue. When ALTER
TABLESPACE MOVE finishes, all those events are reported together. This
part is not a problem. The only part that is a problem is that the
CommandTag comparison in event_trigger.c wasn't happy that a command was
being passed with the ALTER TABLESPACE command tag, because tablespaces
are not supported by that module --- and I think the unhappiness was
only in an assert-only block (but I'm not 100% sure about that last bit,
because I didn't try removing that test.)

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-06-24 04:56:38 Re: releaseOk and LWLockWaitForVar
Previous Message Dilip kumar 2014-06-24 04:13:05 Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]