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

From tanghy.fnst@fujitsu.com
Subject [BUG]"FailedAssertion" reported in lazy_scan_heap() when running logical replication
Date
Msg-id OS0PR01MB611340CBD300A7C4FD6B6101FB5F9@OS0PR01MB6113.jpnprd01.prod.outlook.com
Whole thread Raw
Responses Re: [BUG]"FailedAssertion" reported in lazy_scan_heap() when running logical replication  (Michael Paquier <michael@paquier.xyz>)
Re: [BUG]"FailedAssertion" reported in lazy_scan_heap() when running logical replication  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
Hi

I met an assertion failure at the publisher in lazy_scan_heap() when synchronous running logical replication. Could
someoneplease 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
assertionfailed 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
happenedonly 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
than6min if the server crashed. 

Regards
Tang

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH] We install pg_regress and isolationtester but not pg_isolation_regress
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] We install pg_regress and isolationtester but not pg_isolation_regress