Re: Optimising compactify_tuples() - Mailing list pgsql-hackers

From David Rowley
Subject Re: Optimising compactify_tuples()
Date
Msg-id CAApHDvp1ti2LqLxABL6D3+TiynNkFxMyRCg53yTeVJN5uBc=-g@mail.gmail.com
Whole thread Raw
In response to Re: Optimising compactify_tuples()  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Hi Simon,

On Thu, 17 Sep 2020 at 06:54, Simon Riggs <simon@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Optimising compactify_tuples()
Next
From: Tom Lane
Date:
Subject: Re: DROP relation IF EXISTS Docs and Tests - Bug Fix