Re: 64-bit XIDs in deleted nbtree pages

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: 64-bit XIDs in deleted nbtree pages
Date: 2021-02-19 06:12:01
Message-ID: CAH2-WzmUcsJd6a9xUdUxEmuCe++jJWJDaoJBzZ=Ku58yyyUv0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 18, 2021 at 3:13 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> Agreed. Thanks for your explanation.

Attached is v5, which has some of the changes I talked about. Changes
from v4 include:

* Now only updates metapage during btvacuumcleanup() in the first
patch, which is enough to fix the existing
IndexVacuumInfo.num_heap_tuples issue.

* Restored _bt_getbuf() page-from-FSM XID check. Out of sheer paranoia.

* The second patch in the series now respects work_mem when sizing the
BTPendingRecycle array.

* New enhancement to the XID GlobalVisCheckRemovableFullXid() test
used in the second patch, to allow it to recycle even more pages.
(Still unsure of some of the details here.)

I would like to commit the first patch in a few days -- I refer to the
big patch that makes deleted page XIDs 64-bit/full. Can you take a
look at that one, Masahiko? That would be helpful. I can produce a bug
fix for the IndexVacuumInfo.num_heap_tuples issue fairly easily, but I
think that that should be written after the first patch is finalized
and committed.

The second patch (the new recycling optimization) will require more
work and testing.

Thanks!
--
Peter Geoghegan

Attachment Content-Type Size
v5-0002-Recycle-pages-deleted-during-same-VACUUM.patch application/octet-stream 17.6 KB
v5-0003-Show-pages-newly-deleted-in-VACUUM-VERBOSE-output.patch application/octet-stream 8.7 KB
v5-0001-Use-full-64-bit-XID-for-nbtree-page-deletion.patch application/octet-stream 80.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-02-19 06:12:54 Re: progress reporting for partitioned REINDEX
Previous Message Michael Paquier 2021-02-19 06:10:53 Re: Printing LSN made easy