Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > Re: Review: DTr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 15 of 42 Topic 9629 of 11009
Post > Topic >>

Re: Review: DTrace probes (merged version) ver_03

by alvherre@[EMAIL PROTECTED] (Alvaro Herrera) Jul 25, 2008 at 10:36 PM

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).

In the pgstat_re****t_activity probe, is it good to call the probe before
taking the fast path out?

In the BUFFER_READ_START probe, we do not include the smgrnblocks()
call, which could be significant since it includes a number of system
calls.

I think BUFFER_HIT and BUFFER_MISS should include the "isLocalBuf" flag.
I also wonder whether BUFFER_HIT should be called in the block above,
lines 220-238, where we check the "found" flag, i.e.

    if (isLocalBuf)
    {
        ReadLocalBufferCount++;
        bufHdr = LocalBufferAlloc(smgr, blockNum, &found);
        if (found)
        {
            LocalBufferHitCount++;
            TRACE_POSTGRESQL_BUFFER_HIT(true);		/* local buffer */
        }
	else
	{
	    TRACE_POSTGRESQL_BUFFER_MISS(true);		/* ditto */
	}
    }
    else
    {
        ReadBufferCount++;

        /*
         * lookup the buffer.  IO_IN_PROGRESS is set if the requested
block is
         * not currently in memory.
         */
        bufHdr = BufferAlloc(smgr, blockNum, strategy, &found);
        if (found)
        {
            BufferHitCount++;
            TRACE_POSTGRESQL_BUFFER_HIT(false);		/* not local */
        }
	else
	{
	    TRACE_POSTGRESQL_BUFFER_MISS(false);	/* ditto */
	}
    }

(note that this changes the semantics w.r.t. the i***tend flag).


I understand the desire to have DEADLOCK_FOUND, but is there really a
point in having a DEADLOCK_NOTFOUND probe?  Since this code runs every
time someone waits for a lock longer than a second, there would be a lot
of useless counts and nothing useful.

I find it bogus that we include query rewriting in QUERY_PARSE_START/DONE.
 
I think query rewriting should be a separate probe.

QUERY_PLAN_START is badly placed -- it should be after the check for
utility commands (alternatively there could be a QUERY_PLAN_DONE in the
fast way out for utility commands, but in that case a "is utility" flag
would be needed.  I don't see that there's any point in tracing planning
of utility commands though).

Why are there no probes for the v3 protocol stuff?  There should
be probes for Parse, Bind, Execute message processing too, for
completeness.  Also, I wonder if these probes should be in the for(;;)
loop in PostgresMain() instead of sprinkled in the other routines.
I note that the probes in ****talRun and ****talRunMulti are schizophrenic
about whether they include utility functions or not.

-- 
Alvaro Herrera                               
http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 sup****t

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
 




 42 Posts in Topic:
Review: DTrace probes (merged version)
Zdenek.Kotala@[EMAIL PROT  2008-07-04 16:38:06 
Re: Review: DTrace probes (merged version)
alvherre@[EMAIL PROTECTED  2008-07-04 11:05:40 
Re: Review: DTrace probes (merged version)
tgl@[EMAIL PROTECTED] (T  2008-07-04 12:22:08 
Re: Review: DTrace probes (merged version)
Zdenek.Kotala@[EMAIL PROT  2008-07-04 19:19:40 
Re: Review: DTrace probes (merged version)
alvherre@[EMAIL PROTECTED  2008-07-04 13:30:35 
Re: Review: DTrace probes (merged version)
Zdenek.Kotala@[EMAIL PROT  2008-07-04 19:26:52 
Re: Review: DTrace probes (merged version)
alvherre@[EMAIL PROTECTED  2008-07-04 13:33:05 
Re: Review: DTrace probes (merged version)
Zdenek.Kotala@[EMAIL PROT  2008-07-04 19:42:12 
Re: Review: DTrace probes (merged version)
Zdenek.Kotala@[EMAIL PROT  2008-07-04 19:50:18 
Re: Review: DTrace probes (merged version)
Robert.Lor@[EMAIL PROTECT  2008-07-21 14:47:24 
Re: Review: DTrace probes (merged version)
peter_e@[EMAIL PROTECTED]  2008-07-23 19:02:12 
Re: Review: DTrace probes (merged version)
Zdenek.Kotala@[EMAIL PROT  2008-07-23 20:55:57 
Re: Review: DTrace probes (merged version) ver_03
Zdenek.Kotala@[EMAIL PROT  2008-07-24 17:11:46 
Re: Review: DTrace probes (merged version) ver_03
jesus@[EMAIL PROTECTED]   2008-07-24 12:15:26 
Re: Review: DTrace probes (merged version) ver_03
alvherre@[EMAIL PROTECTED  2008-07-25 22:36:43 
Re: Review: DTrace probes (merged version) ver_03
tgl@[EMAIL PROTECTED] (T  2008-07-26 19:09:45 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-08-01 15:42:23 
Re: Review: DTrace probes (merged version) ver_03
gsmith@[EMAIL PROTECTED]   2008-08-02 16:00:51 
Re: Review: DTrace probes (merged version) ver_03
Zdenek.Kotala@[EMAIL PROT  2008-07-25 09:45:20 
Re: Review: DTrace probes (merged version) ver_03
Zdenek.Kotala@[EMAIL PROT  2008-07-28 12:27:43 
Re: Review: DTrace probes (merged version) ver_03
Zdenek.Kotala@[EMAIL PROT  2008-07-28 13:32:54 
Re: Review: DTrace probes (merged version) ver_03
tgl@[EMAIL PROTECTED] (T  2008-07-28 10:16:21 
Re: Review: DTrace probes (merged version) ver_03
Zdenek.Kotala@[EMAIL PROT  2008-07-28 16:13:11 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-07-28 18:17:56 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-07-28 18:39:19 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-07-28 18:54:14 
Re: Review: DTrace probes (merged version) ver_03
tgl@[EMAIL PROTECTED] (T  2008-07-28 20:06:57 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-07-29 00:23:41 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-07-29 23:34:54 
Re: Review: DTrace probes (merged version) ver_03
alvherre@[EMAIL PROTECTED  2008-07-31 14:20:37 
Re: Review: DTrace probes (merged version) ver_03
alvherre@[EMAIL PROTECTED  2008-07-31 17:08:41 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-07-31 15:21:26 
Re: Review: DTrace probes (merged version) ver_03
alvherre@[EMAIL PROTECTED  2008-07-31 16:43:30 
Re: Review: DTrace probes (merged version) ver_03
alvherre@[EMAIL PROTECTED  2008-07-31 18:19:29 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-07-31 23:08:56 
Re: Review: DTrace probes (merged version) ver_03
alvherre@[EMAIL PROTECTED  2008-08-01 09:19:47 
Re: Review: DTrace probes (merged version) ver_03
alvherre@[EMAIL PROTECTED  2008-08-01 09:31:43 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-07-31 23:22:33 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-08-01 09:27:55 
Re: Review: DTrace probes (merged version) ver_03
Robert.Lor@[EMAIL PROTECT  2008-08-01 09:44:45 
Re: Review: DTrace probes (merged version) ver_03
gsmith@[EMAIL PROTECTED]   2008-08-01 15:18:01 
Re: Review: DTrace probes (merged version) ver_03
alvherre@[EMAIL PROTECTED  2008-08-01 16:01:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 8:36:44 CST 2008.