Christopher Browne cbbrowne
Fri Jul 14 14:47:28 PDT 2006
One of the issues that came up in the meeting at the PostgreSQL
Anniversary Summit was that there are cases where you can get pretty
non-self-explanatory error messages, and that they'd like to see
something better.

This is most frequently the case when something violates a uniqueness
constraint.

For instance, Norman Yamada recently reported problems where his slon
processes would bust when processing a DDL script with the rather opaque:

PGRES_FATAL_ERROR ERROR:  duplicate key violates unique constraint  "pg_trigger_tgrelid_tgname_index"
CONTEXT:  SQL statement "update "pg_catalog".pg_trigger set tgrelid =  $1  where tgrelid =  $2 "

And it was very much NOT obvious what trigger was involved...

I recently introduced a change to the relevant code that will cause the complaint to be more like:

Slony-I: multiple instances of trigger price_ins on table foo
Slony-I: multiple instances of trigger price_before_del on table foo
Slony-I: multiple instances of trigger price_before_ins_upd on table foo
Slony-I: Unable to disable triggers

That seems likely to make that particular case rather less mysterious.

While at the Code Sprint, I walked through the pl/pgsql code, looking for cases where it looked like there were other opportunities for this; no more of them leaped out at me, but, mind you, I was pretty fried after not really having had a weekend :-).

If there are cases where you have gotten a particularly useless error message, I'd appreciate hearing about it, at least if it's from a somewhat modern Slony-I version, as later releases tend to have fewer cases where the errors aren't being trapped so we can report something meaningful.

I can't promise that every improvement anyone might imagine will take place, but hopefully there can be further improvement.




More information about the Slony1-general mailing list