Dmitry Koterov dmitry at koterov.ru
Thu Aug 30 11:57:54 PDT 2007
The idea to test DDL on all nodes and NOT to split it before is great, but I
suppose it is quite hard to implement. And many people uses Slony as
non-realtime replication, so all changes have to be queued: by the time a
new DDL change appeared, not all previous DDL changes may be applied to a
subscriber.

But for people who uses Slony as a realtime replication (like our company),
it would be a good feature.

Frankly, I do not quite understand why Slony splits the whole DDL script to
separate queries at all. Why not to process THE WHOLE script, without any
splitting? Seems it will solve all problems with SQL parsing. Now Slony adds
the whole script as a separate event, and practically it is splitted twice:
by slonik on an admin node and by slon on a subscriber. Why should we split
it,why not to execute the whole script at once?


On 8/30/07, Andrew Hammond <andrew.george.hammond at gmail.com> wrote:
>
> On 8/30/07, Jan Wieck <JanWieck at yahoo.com> wrote:
> >
> > On 8/29/2007 2:52 PM, Dmitry Koterov wrote:
> > > And much worse - seems such DDL with comments breaks the whole
> > > replication (fortunately I have run it on a test server, not in
> > production).
> > > I watched sl_event table on a subscriber and noticed that the whole
> > DDL
> > > (with comments included) are passed and saved in the subscriber.
> >
> > Where in the ANSI SQL standard does it allow -- comments nested inside
> > of /* ... */ comments?
>
>
> I can see having problems with "real" nested comments.
>
>
> /*
>   layer one
>   /*
>     layer two
>   */
>   I'll bet this doesn't work
> */
>
> Or, if you want to get really stupid, like this.
>
> -- this is a stupid place to /* start
> a multi-line coment
> */
>
> But honestly, a parser that fails because of comment characters inside a
> comment... that's kinda broken.
>
> /* this may be stupid
> -- but, really it should still work. */
>
> Just because Postgres itself allows it doesn't mean that every piece of
> > software working with Postgres must be aware of this, does it?
>
>
> I think that for any software which works _only_ with Postgres, it is
> reasonable to assume that it will attempt to be as close to the Postgres
> interpretation / implementation of SQL as possible. One of the ways to te=
st
> DDL before applying it via slonik is to run it with a rollback on each no=
de.
> If a script passes this test, then it seems to me that it's reasonable to
> expect it to work via EXECUTE DDL.
>
> Hmm, maybe that's an idea for a new feature "EXECUTE DDL DRYRUN" or
> something of that nature...
>
> Andrew
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20070830/=
d58313d4/attachment-0001.htm


More information about the Slony1-general mailing list