Adrian Klaver <adrian.klaver@xxxxxxxxxxx> writes: > On 3/3/21 3:58 PM, Fontana Daniel C. (Desartec S.R.L.) wrote: >> When the update is manual, it works. >> It does not work when the update is done using logical replication. >> It is as if the logical replication wizard did not use the search_path > Replication would imply at least two database instances in use. If they > both don't have the same search_path set then there would be a problem. I'm fairly sure that replication workers run with search_path set to just "pg_catalog" for security reasons. Any user-written code that needs to execute in a replication worker *must* schema-qualify all references to non-system objects. As a general rule, code that runs in expression indexes, check constraints, and the like needs to be written to not make assumptions about what search path it's invoked with. Just fix it; your life will be less painful. regards, tom lane