Dmitry Koterov dmitry at koterov.ru
Wed Aug 29 11:52:58 PDT 2007
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.


On 8/29/07, Dmitry Koterov <dmitry at koterov.ru> wrote:
>
> Hello.
>
> I feed the followind DDL SQL code to slonik:
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> -- Execute all schema changes.
> SET statement_timeout TO 0;
>
> /*
> select count(distinct person_id)
> from
>     person
>     join dictionary on dic_category_id=3D11
>     left join person_settings on ps_person_id=3Dperson_id and ps_did=3Ddi=
c_id
> where
>     ps_person_id is null
> -- only 9000!
> */
>
> CREATE SEQUENCE "public"."obj_setting_os_id_seq"
>     INCREMENT 1  MINVALUE 1
>     MAXVALUE 9223372036854775807  START 1
>     CACHE 1;
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> But I see that ALL DDL code below the comment is removed, not only the
> comment:
>
> DDL Statement 0: (0,99) [
>                     -- Execute all schema changes.
>                     SET statement_timeout TO 0;]
> Submit DDL Event to subscribers...
> DDL on origin - PGRES_TUPLES_OK
>
> Seems slonik & others parser parses SQL code incorrectly - skips
> everything after a multi-line comment.
> Please fix this in a new version...
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20070829/=
caf6f213/attachment.htm


More information about the Slony1-general mailing list