Re: ALTER TABLESPACE MOVE command tag tweak - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: ALTER TABLESPACE MOVE command tag tweak
Date
Msg-id 20140624041729.GF5032@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: ALTER TABLESPACE MOVE command tag tweak  (Noah Misch <noah@leadboat.com>)
List 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



pgsql-hackers by date:

Previous
From: Dilip kumar
Date:
Subject: Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Next
From: Amit Kapila
Date:
Subject: Re: releaseOk and LWLockWaitForVar