Re: [BUG] Logical replica crash if there was an error in a function.
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: "Anton A. Melnikov" <aamelnikov@inbox.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Maxim Orlov <orlovmg@gmail.com>
Date: 2022-10-10T10:06:45Z
Lists: pgsql-hackers
On 2022-Sep-24, Tom Lane wrote: > "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. 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/
Commits
-
Avoid crash after function syntax error in a replication worker.
- dea834938005 16.0 landed
- f2dc7f9e35a2 15.1 landed
- ed019b5ef955 11.18 landed
- d9ffccf8db4b 12.13 landed
- b00f342ea0f0 13.9 landed
- 5f3cec77b1b5 10.23 landed
- 2489c38cdc58 14.6 landed