Re: Parallel vacuum: wrong error context when the leader vacuums an index - Mailing list pgsql-hackers

From shihao zhong
Subject Re: Parallel vacuum: wrong error context when the leader vacuums an index
Date
Msg-id CAGRkXqSj4=HUczJ8=OW2FLnkb5iRfYd8NTNS1OizGpcutCOpFA@mail.gmail.com
Whole thread
In response to Parallel vacuum: wrong error context when the leader vacuums an index  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
Hi Bharath,

+1 for the patch. The fix looks right to me.

The new test fails on master with

  CONTEXT:  while scanning relation "public.nbtree_vacuum_error_context"

and passes with the patch. The same holds for an error in the cleanup
pass, an index pass in the middle of the heap scan (master says "while
scanning block 1 of relation"), and an error relayed from a worker. With
the patch all of them name the index, and the worker error no longer ends
with the stale "while scanning relation" line.

One Nit:
The test only covers bulk delete. The cleanup pass reports "while
cleaning up index" and is not tested. A BRIN index on an expression that
raises an error hits it, since BRIN cleanup summarizes the new ranges.

Thanks,
Shihao

pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: pg_resetwal: Fix handling of commit timestamp XIDs
Next
From: "Min, Baohong"
Date:
Subject: RE: [PATCH] Reduce LWLockWaitListLock() cache-line contention with adaptive spin reads