Re: [BUG] Logical replica crash if there was an error in a function.

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Anton A. Melnikov" <aamelnikov@inbox.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Maxim Orlov <orlovmg@gmail.com>
Date: 2022-09-24T17:27:23Z
Lists: pgsql-hackers
"Anton A. Melnikov" <aamelnikov@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.

			regards, tom lane



Commits

  1. Avoid crash after function syntax error in a replication worker.