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

Anton A. Melnikov <aamelnikov@inbox.ru>

From: "Anton A. Melnikov" <aamelnikov@inbox.ru>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Maxim Orlov <orlovmg@gmail.com>
Date: 2022-09-08T08:47:06Z
Lists: pgsql-hackers

Attachments

Hello!

Added a TAP test for this case.

On 30.08.2022 10:09, Anton A. Melnikov wrote:
> Hello!
> 
> The patch was rebased on current master.
> And here is a simplified crash reproduction:
> 1) On primary with 'wal_level = logical' execute:
>   CREATE TABLE public.test (id int NOT NULL, val integer);
>   CREATE PUBLICATION test_pub FOR TABLE test;
> 
> 2) On replica replace XXXX in the repcmd.sql  attached with primary port and execute it:
> psql -f repcmd.sql
> 
> 3) On master execute command:
> INSERT INTO test VALUES ('1');
> 
  
With best regards,

-- 
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Commits

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