Re: Concurrency bug in amcheck

2020-08-04 Thread Peter Geoghegan
On Tue, Aug 4, 2020 at 4:18 PM Alexander Korotkov wrote: > Pushed. Comment is changed as you suggested. But I've replaced "last > pivot tuple" with "remaining tuples", because the page can also have a > high key, which is also a tuple. You're right, of course. Thanks again -- Peter Geoghegan

Re: Concurrency bug in amcheck

2020-08-04 Thread Alexander Korotkov
On Wed, Aug 5, 2020 at 1:58 AM Peter Geoghegan wrote: > On Tue, Aug 4, 2020 at 7:27 AM Alexander Korotkov > wrote: > > Thank you for your reminder. Revised patch is attached. Now, the > > contents of deleted btree pages isn't masked. I've checked that > > installcheck passes with wal_consi

Re: Concurrency bug in amcheck

2020-08-04 Thread Peter Geoghegan
Hi Alexander, On Tue, Aug 4, 2020 at 7:27 AM Alexander Korotkov wrote: > Thank you for your reminder. Revised patch is attached. Now, the contents > of deleted btree pages isn't masked. I've checked that installcheck passes > with wal_consistency_checking='Btree'. I'm going to push this if

Re: Concurrency bug in amcheck

2020-08-04 Thread Alexander Korotkov
Hi, Peter! On Sat, Aug 1, 2020 at 3:23 AM Peter Geoghegan wrote: > On Wed, May 13, 2020 at 4:06 PM Peter Geoghegan wrote: > > On Mon, May 11, 2020 at 5:56 AM Alexander Korotkov > > wrote: > > > Thank you. 2nd patch is proposed for master and makes btree page > > > unlink remove all the items

Re: Concurrency bug in amcheck

2020-07-31 Thread Peter Geoghegan
On Wed, May 13, 2020 at 4:06 PM Peter Geoghegan wrote: > On Mon, May 11, 2020 at 5:56 AM Alexander Korotkov > wrote: > > Thank you. 2nd patch is proposed for master and makes btree page > > unlink remove all the items from the page being deleted. > > This looks good, but can we do the > wal_cons

Re: Concurrency bug in amcheck

2020-05-13 Thread Peter Geoghegan
On Mon, May 11, 2020 at 5:56 AM Alexander Korotkov wrote: > Thank you. I've worked a bit on comments and commit message. I would > appreciate you review. This looks good to me. > > I like your idea of making the primary consistent with the REDO > > routine on the master branch only. I wonder i

Re: Concurrency bug in amcheck

2020-05-11 Thread Alexander Korotkov
On Tue, Apr 28, 2020 at 4:05 AM Peter Geoghegan wrote: > On Mon, Apr 27, 2020 at 4:17 AM Alexander Korotkov > wrote: > > > Assuming it doesn't seem we actually need any items on deleted pages, > > > I can propose to delete them on primary as well. That would make > > > contents of primary and st

Re: Concurrency bug in amcheck

2020-04-27 Thread Peter Geoghegan
On Mon, Apr 27, 2020 at 4:17 AM Alexander Korotkov wrote: > > Assuming it doesn't seem we actually need any items on deleted pages, > > I can propose to delete them on primary as well. That would make > > contents of primary and standby more consistent. What do you think? > > So, my proposal is

Re: Concurrency bug in amcheck

2020-04-27 Thread Alexander Korotkov
On Mon, Apr 27, 2020 at 11:51 AM Alexander Korotkov wrote: > On Wed, Apr 22, 2020 at 7:47 PM Peter Geoghegan wrote: > > On Tue, Apr 21, 2020 at 2:54 AM Alexander Korotkov > > wrote: > > > Proposed fix is attached. Spotted by Konstantin Knizhnik, > > > reproduction case and fix from me. > > > >

Re: Concurrency bug in amcheck

2020-04-27 Thread Alexander Korotkov
On Wed, Apr 22, 2020 at 7:47 PM Peter Geoghegan wrote: > On Tue, Apr 21, 2020 at 2:54 AM Alexander Korotkov > wrote: > > Proposed fix is attached. Spotted by Konstantin Knizhnik, > > reproduction case and fix from me. > > I wonder if we should fix btree_xlog_unlink_page() instead of amcheck. > W

Re: Concurrency bug in amcheck

2020-04-22 Thread Peter Geoghegan
On Tue, Apr 21, 2020 at 2:54 AM Alexander Korotkov wrote: > Proposed fix is attached. Spotted by Konstantin Knizhnik, > reproduction case and fix from me. I wonder if we should fix btree_xlog_unlink_page() instead of amcheck. We already know that its failure to be totally consistent with the pri

Re: Concurrency bug in amcheck

2020-04-22 Thread Andres Freund
Hi, Peter, Just thought you might want to see this one... On 2020-04-21 15:31:13 +0300, Alexander Korotkov wrote: > On Tue, Apr 21, 2020 at 12:54 PM Alexander Korotkov > wrote: > > I found concurrency bug in amcheck running on replica. When > > btree_xlog_unlink_page()

Re: Concurrency bug in amcheck

2020-04-21 Thread Alexander Korotkov
On Tue, Apr 21, 2020 at 12:54 PM Alexander Korotkov wrote: > I found concurrency bug in amcheck running on replica. When > btree_xlog_unlink_page() replays changes to replica, deleted page is > left with no items. But if amcheck steps on such deleted page > palloc_btree_page() expe

Concurrency bug in amcheck

2020-04-21 Thread Alexander Korotkov
Hi! I found concurrency bug in amcheck running on replica. When btree_xlog_unlink_page() replays changes to replica, deleted page is left with no items. But if amcheck steps on such deleted page palloc_btree_page() expects it would have items. (lldb_on_primary) b btbulkdelete primary=# drop