Re: Review: DTrace probes (merged version) ver_03 - Mailing list pgsql-hackers

From Zdenek Kotala
Subject Re: Review: DTrace probes (merged version) ver_03
Date
Msg-id 488DD3F7.4080103@sun.com
Whole thread Raw
In response to Re: Review: DTrace probes (merged version) ver_03  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
List pgsql-hackers
Zdenek Kotala napsal(a):
> Alvaro Herrera napsal(a):
>> Zdenek Kotala wrote:
>>> I performed review and I prepared own patch which contains only 
>>> probes without any issue. I suggest commit this patch because the 
>>> rest of patch is independent and it can be committed next commit fest 
>>> after rework.
>>>
>>> I found following issues:
>>
>> I noticed that CLOG, Subtrans and Multixact probes are added during a
>> regular Checkpoint, but not during a shutdown flush.  I think the probes
>> should count that too (probably with the same counter).
> 
> Yeah, good catch.

When I'm thinking about it, It seems to me better idea to have

TRACE_POSTGRESQL_CLOG_SHUTDOWN_START();
TRACE_POSTGRESQL_XLOG_SHUTDOWN_START();

Because you will able to determine what was a reason for flush and how log take 
shutting down.


By the way why the shutdown order is following:

05617     CreateCheckPoint(CHECKPOINT_IS_SHUTDOWN | CHECKPOINT_IMMEDIATE);
05618     ShutdownCLOG();
05619     ShutdownSUBTRANS();
05620     ShutdownMultiXact();

What does happen when kill -9/power lost comes between lines 5617 and 5618?
    Zdenek


pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: WITH RECUSIVE patches 0723
Next
From: Tom Lane
Date:
Subject: Re: Review: DTrace probes (merged version) ver_03