Re: Command Triggers

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Greg Smith <greg(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Command Triggers
Date: 2011-12-14 02:12:56
Message-ID: 4EE80628.5020104@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/13/2011 9:59 AM, Robert Haas wrote:
> it. Dimitri says that he wants it so that we can add support for
> CREATE TABLE, ALTER TABLE, and DROP TABLE to Slony, Bucardo, and
> Londiste. My fear is that it won't turn out to be adequate to that
> task, because there won't actually be enough information in the CREATE
> TABLE statement to do the same thing on all servers. In particular,
> you won't have the index or constraint names, and you might not have
> the schema or tablespace information either. But maybe we ought to
> put the question to the intended audience for the feature - is there a
> Slony developer in the house?

I agree. While it is one of the most "asked for" features among the
trigger based replication systems, I fear that an incomplete solution
will cause more problems than it solves. It is far easier to tell people
"DDL doesn't propagate automatically, do this instead ..." than to try
to support a limited list of commands, that may or may not propagate as
intended. And all sorts of side effects, like search_path, user names
and even the existing schema in the replica can cause any given DDL
"string" to actually do something completely different than what
happened on the origin.

On top of that, the PostgreSQL main project has a built in replication
solution that doesn't need any of this. There is no need for anyone, but
us trigger replication folks, to keep command triggers in sync with all
other features.

I don't think it is going to be reliable enough any time soon to make
this the default for any of the trigger based replication systems.

Jan

--
Anyone who trades liberty for security deserves neither
liberty nor security. -- Benjamin Franklin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-12-14 02:13:27 Re: NOTIFY with tuples
Previous Message Joshua D. Drake 2011-12-14 01:11:38 Re: WIP: URI connection string support for libpq