Re: Fixes for two separate bugs in nbtree VACUUM's page deletion

2020-05-02 Thread Peter Geoghegan
On Thu, Apr 30, 2020 at 12:20 AM Masahiko Sawada wrote: > For the part of treating that case as an index corruption I will need > some time to review because of lacking knowledge of btree indexes. So > I'll review it later. I pushed the refactoring patch today. Thanks for the review. The final

Re: Fixes for two separate bugs in nbtree VACUUM's page deletion

2020-05-01 Thread Peter Geoghegan
On Wed, Apr 29, 2020 at 11:38 PM Masahiko Sawada wrote: > Thank you for the explanation. This makes sense to me. Pushed both of the fixes. Thanks! -- Peter Geoghegan

Re: Fixes for two separate bugs in nbtree VACUUM's page deletion

2020-04-30 Thread Masahiko Sawada
On Thu, 30 Apr 2020 at 07:29, Peter Geoghegan wrote: > > On Tue, Apr 28, 2020 at 12:21 AM Masahiko Sawada > wrote: > > For the first fix it seems better to push down the logic to the page > > deletion code as your 0001 patch does so. The following change changes > > the page deletion code so

Re: Fixes for two separate bugs in nbtree VACUUM's page deletion

2020-04-30 Thread Masahiko Sawada
On Wed, 29 Apr 2020 at 01:17, Peter Geoghegan wrote: > > On Tue, Apr 28, 2020 at 12:21 AM Masahiko Sawada > wrote: > > I agree with both patches. > > Thanks for the review. > > > For the first fix it seems better to push down the logic to the page > > deletion code as your 0001 patch does so.

Re: Fixes for two separate bugs in nbtree VACUUM's page deletion

2020-04-29 Thread Peter Geoghegan
On Tue, Apr 28, 2020 at 12:21 AM Masahiko Sawada wrote: > For the first fix it seems better to push down the logic to the page > deletion code as your 0001 patch does so. The following change changes > the page deletion code so that it emits LOG message indicating the > index corruption when a

Re: Fixes for two separate bugs in nbtree VACUUM's page deletion

2020-04-28 Thread Peter Geoghegan
On Tue, Apr 28, 2020 at 12:21 AM Masahiko Sawada wrote: > I agree with both patches. Thanks for the review. > For the first fix it seems better to push down the logic to the page > deletion code as your 0001 patch does so. The following change changes > the page deletion code so that it emits

Re: Fixes for two separate bugs in nbtree VACUUM's page deletion

2020-04-28 Thread Masahiko Sawada
On Tue, 28 Apr 2020 at 11:35, Peter Geoghegan wrote: > > On Mon, Apr 27, 2020 at 11:02 AM Peter Geoghegan wrote: > > I would like to backpatch both patches to all branches that have > > commit 857f9c36cda -- v11, v12, and master. The second issue isn't > > serious, but it seems worth keeping

Re: Fixes for two separate bugs in nbtree VACUUM's page deletion

2020-04-27 Thread Peter Geoghegan
On Mon, Apr 27, 2020 at 11:02 AM Peter Geoghegan wrote: > I would like to backpatch both patches to all branches that have > commit 857f9c36cda -- v11, v12, and master. The second issue isn't > serious, but it seems worth keeping v11+ in sync in this area. Note > that any backpatch theoretically

Fixes for two separate bugs in nbtree VACUUM's page deletion

2020-04-27 Thread Peter Geoghegan
Attached are two patches, both of which are fixes for bugs in nbtree VACUUM page deletion. The first fix for a bug in commit 857f9c36cda. The immediate issue is that the code that maintains the oldest btpo.xact in the index accesses the special area of pages without holding a buffer pin. More