Re: incorrect xlog.c coverage report - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: incorrect xlog.c coverage report
Date
Msg-id 20181122012153.GD3369@paquier.xyz
Whole thread Raw
In response to Re: incorrect xlog.c coverage report  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: incorrect xlog.c coverage report
List pgsql-hackers
On Wed, Nov 21, 2018 at 01:20:48PM -0500, Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> I think we should change all calls of ->teardown_node to ->stop(),
>> except the one in the END block, and look for places which are currently
>> relying too much on END (i.e. add more ->stop() calls where needed).
>
> Hm.  We probably don't want to have zero coverage of immediate stop mode,
> though I agree we could cut it way back.

The root of the issue is that gcov is not able to write out the gcda
file when Postgres is stopped in immediate mode?  There are some code
paths in the recovery tests where teardown_node is used on purpose (see
for example 009_twophase.pl).

At a lower level, teardown_node is actually just doing
$node->stop('immediate').  Would it be perhaps less confusing when
reading the tests to remove teardown_node and use $node->stop
everywhere, with the stop mode wanted?  This needs a careful lookup
though.  I am also wondering about the performance impact in the time it
takes to run the tests in serializable fashion.  fsync is disabled so
the shutdown checkpoint would have less impact, still that's worth
checking.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Online verification of checksums
Next
From: Thomas Munro
Date:
Subject: Re: incorrect xlog.c coverage report