On Thu, Jun 14, 2012 at 5:00 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Thu, Jun 14, 2012 at 4:51 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>> Lets sidetrack this till we have a tender agreement on how to handle DDL ;). I
>> am aware of the issues with rollbacks, truncate et al...
>
> Agreed; I will write up my thoughts about DDL on the other thread. I
> think that's a key thing we need to figure out; once we understand how
> we're handling that, the correct design for this will probably fall
> out pretty naturally.
I wonder if *an* answer (if not forcibly a perfect one) is to provide
a capturable injection point.
A possible shape of this would be to have a function to which you pass
a DDL statement, at which point, it does two things:
a) Runs the DDL, to make the requested change, and
b) Captures the DDL in a convenient form in the WAL log so that it may
be detected and replayed at the right point in processing.
That's not a solution for capturing DDL automatically, but it's
something that would be useful-ish even today, for systems like Slony
and Londiste, and this would be natural to connect to Dimitri's "Event
Triggers."
That also fits with the desire to have components that are (at least
hopefully) usable to other existing replication systems.
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"