Re: [BUG] Logical replica crash if there was an error in a function.
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: "Anton A. Melnikov" <aamelnikov@inbox.ru>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Maxim Orlov <orlovmg@gmail.com>
Date: 2022-10-12T05:24:29Z
Lists: pgsql-hackers
On Sun, Oct 09, 2022 at 12:24:23PM +0300, Anton A. Melnikov wrote:
> On the other hand, function_parse_error_transpose() tries to get
> the original query text (INSERT INTO test VALUES ('1') in our case) from
> the ActivePortal to clarify the location of the error.
> But in the logrep worker there is no way to restore original query text
> from the logrep message. There is only 'zipped' query equivalent to the original.
> So any function_parse_error_transpose() call seems to be useless
> in the logrep worker.
Yeah, the query string is not available in this context, but it surely
looks wrong to me to assume that something as low-level as
function_parse_error_transpose() needs to be updated for the sake of a
logical worker, while we have other areas that would expect a portal
to be set up.
--
Michael
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