From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: error context for vacuum to include block number |
Date: | 2020-03-27 08:55:42 |
Message-ID: | CAA4eK1LzBm5aVTaP2SKX4Unx8hBUO53KhaMy+6bkHLy3BfhD-g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Mar 27, 2020 at 1:29 PM Masahiko Sawada
<masahiko(dot)sawada(at)2ndquadrant(dot)com> wrote:
>
> On Fri, 27 Mar 2020 at 07:17, Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> >
> > On Thu, Mar 26, 2020 at 10:04:57AM -0500, Justin Pryzby wrote:
> > > Does that address your comment ?
> >
> > I hope so.
>
> Thank you for updating the patch. I'm concerned a bit about overhead
> of frequently updating and reverting the callback arguments in
> lazy_vacuum_page(). We call that function every time when we vacuum a
> page, but if the table has an index, we actually don't need to update
> the callback arguments in that function. But I hope it's negligible
> since all operation will be performed on memory.
>
Right, it will be a few instructions. I think if there is any
overhead of this, we can easily avoid that by (a) adding a check in
update_vacuum_error_cbarg which tells if the phase is getting changed
or not and if it is not changed, then return, (b) pass additional in
lazy_vacuum_page() to indicate whether we need to change the phase,
(c) just invoke update_vacuum_error_cbarg() in the caller. The
current way appears to be a bit neat than these options, so not sure
if there is an advantage in changing it. Anyway, if we see any
problem with that it is trivial to change it.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | tushar | 2020-03-27 09:21:21 | Re: [Proposal] Global temporary tables |
Previous Message | Fujii Masao | 2020-03-27 08:54:47 | Re: Some problems of recovery conflict wait events |