Re: Add CREATE support to event triggers - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Add CREATE support to event triggers
Date
Msg-id 20141127020113.GL28859@tamriel.snowman.net
Whole thread Raw
In response to Re: Add CREATE support to event triggers  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Add CREATE support to event triggers  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
* Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> Bruce Momjian wrote:
> > How would replicating DDL handle cases where the master and slave
> > servers have different major versions and the DDL is only supported by
> > the Postgres version on the master server?
>
> Normally you would replicate between an older master and a newer
> replica, so this shouldn't be an issue.  I find it unlikely that we
> would de-support some syntax that works in an older version: it would
> break pg_dump, for one thing.

While I tend to agree with you that it's not something we're likely to
do, how would it break pg_dump?  We have plenty of version-specific
logic in pg_dump and we could certainly generate a different syntax in
a newer version than we did in an older version, if the newer server was
expecting something different.  We've always held that you should use
the version of pg_dump which match the server you are moving *to*, after
all.

> In other words I view cross-version replication as a mechanism to
> upgrade, not something that you would use permanently.  Once you
> finish upgrading, promote the newer server and ditch the old master.

I agree with this also.

> > If it would fail, does this limit the idea that logical replication
> > allows major version-different replication?
>
> Not in my view, at least.

I'm all for having logical replication be a way to do major version
different replication (particularly for the purposes of upgrades), but
it shouldn't mean we can never de-support a given syntax.

As one example, we've discussed a few times removing certain table-level
privileges on the basis that they practically mean you own the table.
Perhaps that'll never actually happen, but if it does, logical
replication would need to deal with it.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Add CREATE support to event triggers
Next
From: Michael Paquier
Date:
Subject: Re: Add shutdown_at_recovery_target option to recovery.conf