RE: [BUG]"FailedAssertion" reported in lazy_scan_heap() when running logical replication - Mailing list pgsql-hackers

From tanghy.fnst@fujitsu.com
Subject RE: [BUG]"FailedAssertion" reported in lazy_scan_heap() when running logical replication
Date
Msg-id OS0PR01MB61131168BB199957E9227B5DFB5F9@OS0PR01MB6113.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: [BUG]"FailedAssertion" reported in lazy_scan_heap() when running logical replication  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
On Thursday, April 29, 2021 1:22 PM, Peter Geoghegan <pg@bowt.ie> wrote

>Is setting all_visible_according_to_vm false as below enough to avoid
>the assertion failure?
>
>diff --git a/src/backend/access/heap/vacuumlazy.c
>b/src/backend/access/heap/vacuumlazy.c
>index c3fc12d76c..76c17e063e 100644
>--- a/src/backend/access/heap/vacuumlazy.c
>+++ b/src/backend/access/heap/vacuumlazy.c
>@@ -1146,6 +1146,7 @@ lazy_scan_heap(LVRelState *vacrel, VacuumParams
>*params, bool aggressive)
>             {
>                 ReleaseBuffer(vmbuffer);
>                 vmbuffer = InvalidBuffer;
>+                all_visible_according_to_vm = false;
>             }
>
>             /* Remove the collected garbage tuples from table and indexes */

Thanks for your reply.
I tried your patch but the problem seems not be fixed.

Regards,
Tang

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Replication slot stats misgivings
Next
From: Dilip Kumar
Date:
Subject: Re: [BUG] "FailedAssertion" reported when streaming in logical replication