From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: error context for vacuum to include block number |
Date: | 2020-03-20 00:29:09 |
Message-ID: | 20200320002909.GU26184@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Mar 19, 2020 at 03:29:31PM -0500, Justin Pryzby wrote:
> I was going to suggest that we could do that by passing in a pointer to a local
> variable "LVRelStats olderrcbarg", like:
> | update_vacuum_error_cbarg(vacrelstats, VACUUM_ERRCB_PHASE_SCAN_HEAP,
> | blkno, NULL, &olderrcbarg);
>
> and then later call:
> |update_vacuum_error_cbarg(vacrelstats, olderrcbarg.phase,
> | olderrcbarg.blkno,
> | olderrcbarg.indname,
> | NULL);
>
> I implemented it in a separate patch, but it may be a bad idea, due to freeing
> indname. To exercise it, I tried to cause a crash by changing "else if
> (errcbarg->indname)" to "if" without else, but wasn't able to cause a crash,
> probably just due to having a narrow timing window.
I realized it was better for the caller to just assign the struct on its own.
Which gives me an excuse for resending patch, which is needed since I spent too
much time testing this that I failed to update the tip commit for the new
argument.
> It's probably a good idea to pass the indname rather than the relation in any
> case.
I included that with 0001.
I also fixed the argument name in the prototype (Relation rel vs indrel).
And removed these, which were the whole motivation behind saving the values.
|Set the error context while continuing heap scan
--
Justin
Attachment | Content-Type | Size |
---|---|---|
v28-0001-vacuum-errcontext-to-show-block-being-processed.patch | text/x-diff | 18.8 KB |
v28-0002-Save-the-values-of-the-callback.patch | text/x-diff | 7.4 KB |
v28-0003-Drop-reltuples.patch | text/x-diff | 4.0 KB |
v28-0004-add-callback-for-truncation.patch | text/x-diff | 4.4 KB |
v28-0005-Avoid-some-calls-to-RelationGetRelationName.patch | text/x-diff | 3.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2020-03-20 00:34:11 | Re: nbtree: assertion failure in _bt_killitems() for posting tuple |
Previous Message | Alvaro Herrera | 2020-03-20 00:11:22 | Re: Add A Glossary |