On 2022-Sep-24, Tom Lane wrote:

> "Anton A. Melnikov" <aamelni...@inbox.ru> writes:
> > [ v4-0001-Fix-logical-replica-assert-on-func-error.patch ]
> 
> I took a quick look at this.  I think you're solving the
> problem in the wrong place.  The real issue is why are
> we not setting up ActivePortal correctly when running
> user-defined code in a logrep worker?  There is other code
> that expects that to be set, eg EnsurePortalSnapshotExists.

Right ... mostly, the logical replication *does* attempt to set up a
transaction and active snapshot when replaying actions (c.f.
begin_replication_step()).  Is this firing at an inappropriate time,
perhaps?

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/


Reply via email to