[BUG]"FailedAssertion" reported in lazy_scan_heap() when running logical replication

From: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
To: "Amit(dot)Kapila(at)fujitsu(dot)com" <Amit(dot)Kapila(at)fujitsu(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: [BUG]"FailedAssertion" reported in lazy_scan_heap() when running logical replication
Date: 2021-04-29 02:34:21
Message-ID: OS0PR01MB611340CBD300A7C4FD6B6101FB5F9@OS0PR01MB6113.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I met an assertion failure at the publisher in lazy_scan_heap() when synchronous running logical replication. Could someone please take a look at it?

Here's what I did to produce the problem.

First, use './configure --enable-cassert' to build the PG.
Then, I created multiple publications at publisher and multiple subscriptions at subscriber.
Then, set the value of synchronous_standby_names and reload, make them in synchronous commit mode. After that, an assertion failed at publisher when I COMMIT and ROLLBACK transactions concurrently:

>TRAP: FailedAssertion("!all_visible_according_to_vm || prunestate.all_visible", File: "vacuumlazy.c", Line: 1347, PID: 1274675)

BTW, in asynchronous mode, the same problem can also happen but in a low frequency.(I tried many times, but the problem happened only 2 times)
As for synchronous mode, I found it seems easier to reproduce the problem with setting "autovacuum_naptime = 1".
But it still can't be 100% to reproduced it. (I tested it 5 times, 3 of them reproduced it.)

The script and the log are attached. It took about 6min to run it(without problem) on my machine and it could be less than 6min if the server crashed.

Regards
Tang

Attachment Content-Type Size
script.zip application/x-zip-compressed 4.4 KB
pub.log application/octet-stream 9.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-04-29 02:41:38 Re: [PATCH] We install pg_regress and isolationtester but not pg_isolation_regress
Previous Message Michael Paquier 2021-04-29 02:33:46 Re: [PATCH] We install pg_regress and isolationtester but not pg_isolation_regress