[Bucardo-general] Add sync failed

Shahzad Bacha shahzadbacha.gis at gmail.com
Sun Oct 18 19:54:29 UTC 2020


Thank you David, With your help i identified the problem.

You were right, there was an event trigger configured on the database,
which executes whenever a new function is created in that database. So when
i disabled that trigger, i was able to add sync.

Thanks alot :)

On Sun, Oct 18, 2020 at 9:56 PM David Christensen <david at endpoint.com>
wrote:

> Hi Shahzad,
>
> Bucardo does not contain any references to “function_log” or
> “on_function_event” in the code history; I suspect that this is related to
> some other function/extension that you have installed on one of the
> databases.
>
> From the query you posted, it looks like it might have something to do
> with a function that runs from an event trigger, which Bucardo does not
> use.  If this is some residual junk from your database then you might be
> able to remove the existing event trigger from the database.  It is also
> possible there is a different `search_path` than this custom function
> expects (since Bucardo runs as the `bucardo` user and would thus have that
> as its `search_path`).
>
> You can check your event triggers in psql using the `\dy` command; I’d
> check this on the database identified in the error message.  You might be
> able to look at the source and determine if this is a custom functionality
> or something residual that way.  I’d also look at the source of the
> function in question; `\ef public.on_function_event` to review and see if
> this seems like it’s expecting a particular search path or not.
>
> Best of luck hunting this down!
>
> David
> --
> David Christensen
> Senior Software and Database Engineer
> End Point Corporation
> david at endpoint.com
> 785-727-1171
>
>
> > On Oct 17, 2020, at 6:41 PM, Shahzad Bacha <shahzadbacha.gis at gmail.com>
> wrote:
> >
> > Hi, I have been using bucardo for the last two years for multimaster
> replication without any issue but a few days earlier i got this error while
> trying to add new sync or adding to existing sync.
> >
> > WARNING:  Issuing rollback() due to DESTROY without explicit
> disconnect() of DBD::Pg::db handle
> dbname=TPLMaps;host=172.16.130.23;port=5432 at line 128.
> > Failed to add sync: DBD::Pg::st execute failed: ERROR:  DBD::Pg::db do
> failed: ERROR:  relation "function_log" does not exist
> > LINE 1: insert into function_log
> >                     ^
> > QUERY:  insert into function_log
> >     select now(), nspname, proname, command_tag, prosrc, current_user
> >     from pg_event_trigger_ddl_commands() e
> >     join pg_proc p on p.oid = e.objid
> >     join pg_namespace n on n.oid = pronamespace
> > CONTEXT:  PL/pgSQL function public.on_function_event() line 3 at SQL
> statement at line 128. at line 30.
> > CONTEXT:  PL/Perl function "validate_sync" at /usr/local/bin/bucardo
> line 4670.
> >
> > I then tried to upgrade from 5.5 to 5.6 version but the same error
> occurs.
> >
> > Also I uninstalled bucardo by removing bucardo database and schemas from
> all databases and then removed all bucardo files and folders and
> reinstalled from scratch but same error appears on adding sync.
> >
> > Can anyone help me?
> >
> > Thanks
> > _______________________________________________
> > Bucardo-general mailing list
> > Bucardo-general at bucardo.org
> > https://bucardo.org/mailman/listinfo/bucardo-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://bucardo.org/pipermail/bucardo-general/attachments/20201019/1b867702/attachment.htm>


More information about the Bucardo-general mailing list