Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae

Bowen Shi <zxwsbg12138@gmail.com>

From: Bowen Shi <zxwsbg12138@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Melanie Plageman <melanieplageman@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Matthias van de Meent <boekewurm+postgres@gmail.com>, Noah Misch <noah@leadboat.com>, Peter Geoghegan <pg@bowt.ie>, Alexander Lakhin <exclusion@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2024-05-17T02:12:32Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Ensure vacuum removes all visibly dead tuples older than OldestXmin

  2. Combine freezing and pruning steps in VACUUM

  3. Handle non-chain tuples outside of heap_prune_chain()

  4. Fix false reports in pg_visibility

  5. Remove retry loop in heap_page_prune().

  6. vacuumlazy.c: document vistest and OldestXmin.

  7. Deduplicate choice of horizon for a relation procarray.c.

  8. Remove tupgone special case from vacuumlazy.c.

  9. Simplify state managed by VACUUM.

  10. Recycle nbtree pages deleted during same VACUUM.

  11. snapshot scalability: Don't compute global horizons while building snapshots.

  12. Raise error when affecting tuple moved into different partition.

Hi

On Fri, May 17, 2024 at 12:38 AM Andres Freund <andres@anarazel.de> wrote:

> Hi,
>
> On 2024-05-16 15:31:20 +0800, Bowen Shi wrote:
> > Yes, I have preserved the coredump file of vacuum and several other
> related
> > processes. It has been at least 10 minutes stuck in the retry loop since
> I
> > dumped this core file.
>
> Could you print out *vacrel?
>
> I'm wondering if there was index processing, due to the number of tuples.
> And
> if so, what type of indexes. There'd need to be something that could lead
> to
> new snapshots being acquired...
>

(gdb) p * vacrel
$2 = {rel = 0x2403028, indrels = 0x234e550, nindexes = 12, bstrategy =
0x2368e28, pvs = 0x0,
  aggressive = false, skipwithvm = true, consider_bypass_optimization =
false,
  do_index_vacuuming = true, do_index_cleanup = true, do_rel_truncate =
true, cutoffs = {
    relfrozenxid = 927, relminmxid = 1, OldestXmin = 1106, OldestMxact = 1,
    FreezeLimit = 4244968402, MultiXactCutoff = 4289967297},
  vistest = 0xe693f0 <GlobalVisDataRels>, NewRelfrozenXid = 1106,
NewRelminMxid = 1,
  skippedallvis = false, dbname = 0x234e7f0 "db1", relnamespace = 0x234eb38
"public",
  relname = 0x234eb48 "t1", indname = 0x0, blkno = 349565,
  offnum = 10, phase = VACUUM_ERRCB_PHASE_SCAN_HEAP, verbose = false,
  dead_items = 0x7fa22f48d040, rel_pages = 1302478, scanned_pages = 349566,
removed_pages = 0,
  frozen_pages = 592, lpdead_item_pages = 349565, missed_dead_pages = 0,
  nonempty_pages = 349495, new_rel_tuples = 0, new_live_tuples = 0,
indstats = 0x234e6e0,
  num_index_scans = 1, tuples_deleted = 11184540, tuples_frozen = 1540,
lpdead_items = 11184540,
  live_tuples = 1540, recently_dead_tuples = 0, missed_dead_tuples = 0}
(gdb) p * vacrel->bstrategy
$3 = {btype = BAS_VACUUM, nbuffers = 32, current = 30, buffers = 0x2368e34}




-- 
Regards
Bowen Shi