Re: BUG #17055: Logical replication worker crashes when applying update of row that dose not exist in target partiti

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: sbernikov(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17055: Logical replication worker crashes when applying update of row that dose not exist in target partiti
Date: 2021-06-11 05:56:58
Message-ID: CA+HiwqG05LNWKv=fJDtF93LFmA99KCSZtnAJUAsjBOLFOPy-fA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Jun 11, 2021 at 9:17 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> > This error happens when logical replication target is partitioned table.
>
> Thanks for the report! This one reproduces on HEAD as well as v13.

+1, confirmed here too.

> Also, people should be aware that this one causes the logrep worker
> to crash repeatedly, which will fill your disk with core files
> quite quickly.

Thanks for this tip.

The problem is that apply_handle_tuple_routing() marches on as if it
could go ahead and update a tuple that it was just told doesn't exist.

Attached fixes the problem for me. Not sure if adding a test case makes sense.

--
Amit Langote
EDB: http://www.enterprisedb.com

Attachment Content-Type Size
logirep-partition-update-tuple-not-found-fix.patch application/octet-stream 1.4 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michel Helms 2021-06-11 06:15:57 Re: pg_table_size errors "invalid name syntax" for table names containing spaces
Previous Message Tom Lane 2021-06-11 00:17:21 Re: BUG #17055: Logical replication worker crashes when applying update of row that dose not exist in target partiti