Re: Optimising compactify_tuples()

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Optimising compactify_tuples()
Date: 2020-09-16 23:21:37
Message-ID: CAApHDvp1ti2LqLxABL6D3+TiynNkFxMyRCg53yTeVJN5uBc=-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Simon,

On Thu, 17 Sep 2020 at 06:54, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> Should pg_rusage_init(&ru0);
> be at the start of the REDO loop, since you only use it if we take that path?

Thanks for commenting.

I may be misunderstanding your words, but as far as I see it the
pg_rusage_init() is only called if we're going to go into recovery.
The pg_rusage_init() and pg_rusage_show() seem to be in the same
scope, so I can't quite see how we could do the pg_rusage_init()
without the pg_rusage_show(). Oh wait, there's the possibility that
if recoveryTargetAction == RECOVERY_TARGET_ACTION_SHUTDOWN that we'll
exit before we report end of recovery. I'm pretty sure I'm
misunderstanding you though.

If it's easier to explain, please just post a small patch with what you mean.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-09-16 23:42:15 Re: DROP relation IF EXISTS Docs and Tests - Bug Fix
Previous Message Andres Freund 2020-09-16 23:05:18 Re: Optimising compactify_tuples()