Re: small improvement of the elapsed time for truncating heap in vacuum

From: Kasahara Tatsuhito <kasahara(dot)tatsuhito(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: small improvement of the elapsed time for truncating heap in vacuum
Date: 2020-02-17 03:43:41
Message-ID: CAP0=ZVKQRGN4-_b4Zqf=Prn4DYT6MxQFsJ8L9te_x3tphB+iuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Fri, Feb 14, 2020 at 4:50 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> Regarding the patch, isn't it better to put pg_rusage_init() at the
> top of do loop block? If we do this, as a side-effect, we can get
> rid of pg_rusage_init() at the top of lazy_truncate_heap().
Thanks for your reply.
Yeah, it makes sense.

Attached patch moves pg_rusage_init() to the top of do-loop-block.

Best regards,
--
Tatsuhito Kasahara
kasahara.tatsuhito _at_ gmail.com

Attachment Content-Type Size
reset_usage_v2.patch application/octet-stream 760 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2020-02-17 03:57:31 Re: error context for vacuum to include block number
Previous Message Bryn Llewellyn 2020-02-17 03:05:26 Re: jsonb_object() seems to be buggy. jsonb_build_object() is good.