<div dir="ltr">Thank you David, With your help i identified the problem.<br><br>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.<div><br></div><div>Thanks alot :)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 18, 2020 at 9:56 PM David Christensen <<a href="mailto:david@endpoint.com">david@endpoint.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Shahzad,<br>
<br>
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.<br>
<br>
>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`).<br>
<br>
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.<br>
<br>
Best of luck hunting this down!<br>
<br>
David<br>
--<br>
David Christensen<br>
Senior Software and Database Engineer<br>
End Point Corporation<br>
<a href="mailto:david@endpoint.com" target="_blank">david@endpoint.com</a><br>
785-727-1171<br>
<br>
<br>
> On Oct 17, 2020, at 6:41 PM, Shahzad Bacha <<a href="mailto:shahzadbacha.gis@gmail.com" target="_blank">shahzadbacha.gis@gmail.com</a>> wrote:<br>
> <br>
> 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.<br>
> <br>
> 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.<br>
> Failed to add sync: DBD::Pg::st execute failed: ERROR:  DBD::Pg::db do failed: ERROR:  relation "function_log" does not exist<br>
> LINE 1: insert into function_log<br>
>                     ^<br>
> QUERY:  insert into function_log<br>
>     select now(), nspname, proname, command_tag, prosrc, current_user<br>
>     from pg_event_trigger_ddl_commands() e<br>
>     join pg_proc p on p.oid = e.objid<br>
>     join pg_namespace n on n.oid = pronamespace<br>
> CONTEXT:  PL/pgSQL function public.on_function_event() line 3 at SQL statement at line 128. at line 30.<br>
> CONTEXT:  PL/Perl function "validate_sync" at /usr/local/bin/bucardo line 4670.<br>
> <br>
> I then tried to upgrade from 5.5 to 5.6 version but the same error occurs.<br>
> <br>
> 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.<br>
> <br>
> Can anyone help me?<br>
> <br>
> Thanks<br>
> _______________________________________________<br>
> Bucardo-general mailing list<br>
> <a href="mailto:Bucardo-general@bucardo.org" target="_blank">Bucardo-general@bucardo.org</a><br>
> <a href="https://bucardo.org/mailman/listinfo/bucardo-general" rel="noreferrer" target="_blank">https://bucardo.org/mailman/listinfo/bucardo-general</a><br>
<br>
</blockquote></div>