Re: error context for vacuum to include block number

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: error context for vacuum to include block number
Date: 2019-12-26 15:57:04
Message-ID: 20191226155704.GA12890@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 24, 2019 at 01:19:09PM +0900, Michael Paquier wrote:
> On Mon, Dec 23, 2019 at 07:24:28PM -0600, Justin Pryzby wrote:
> > I renamed.
>
> Hmm. I have found what was partially itching me for patch 0002, and
> that's actually the fact that we don't do the error reporting for heap
> within lazy_vacuum_heap() because the code relies too much on updating
> two progress parameters at the same time, on top of the fact that you
> are mixing multiple concepts with this refactoring. One problem is
> that if this code is refactored in the future, future callers of
> lazy_vacuum_heap() would miss the update of the progress reporting.
> Splitting things improves also the readability of the code, so
> attached is the refactoring I would do for this portion of the set.
> It is also more natural to increment num_index_scans when the

I agree that's better.
I don't see any reason why the progress params need to be updated atomically.
So rebasified against your patch.

Attachment Content-Type Size
v7-0001-Rename-buf-to-avoid-shadowing-buf-of-another-type.patch text/x-diff 2.7 KB
v7-0002-michael-dedup.patch text/x-diff 5.5 KB
v7-0003-dedup2-skip_blocks.patch text/x-diff 9.1 KB
v7-0004-vacuum-errcontext-to-show-block-being-processed.patch text/x-diff 3.8 KB
v7-0005-add-errcontext-callback-in-lazy_vacuum_heap-too.patch text/x-diff 1.9 KB
v7-0006-Print-debug-line-before-starting-each-vacuum-step.patch text/x-diff 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-12-26 16:20:48 Re: unsupportable composite type partition keys
Previous Message Mahendra Singh 2019-12-26 14:50:14 Re: Assert failure due to "drop schema pg_temp_3 cascade" for temporary tables and \d+ is not showing any info after drooping temp table schema