Re: pgsql: Further dtrace adjustments for the backend-IDs-in-relpath patch.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Further dtrace adjustments for the backend-IDs-in-relpath patch.
Date: 2010-08-14 21:58:30
Message-ID: AANLkTi=E=42-Ux=n=R5TGXf2WiiwHw8Z22JJeW3JNOk9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Sat, Aug 14, 2010 at 12:35 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> rhaas(at)postgresql(dot)org (Robert Haas) writes:
>> Further dtrace adjustments for the backend-IDs-in-relpath patch.
>
> Hrm, this doesn't look right at all.  The documentation now advertises
> that backendid is passed to a number of probes that the code isn't
> actually doing that for.  I agree with the changes proposed by the
> docs changes, and would suggest that buffer-flush-start,
> buffer-flush-done, buffer-write-dirty-start, and buffer-write-dirty-done
> probes probably need to get the backendid too.  But in any case the
> code isn't matching the docs in HEAD.

Aargh. I thought I had checked this pretty carefully before
committing that last patch. I still can't see what I'm missing; here
are all the probes.d and monitoring.sgml entries that have been
changed in the last 10 revs of the git tree, matched up one for one:

+ probe buffer__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool);
<entry>buffer-read-start</entry>
<entry>(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool)</entry>
+ probe buffer__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid,
int, bool, bool);
<entry>buffer-read-done</entry>
<entry>(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool, bool)</entry>
+ probe smgr__md__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
<entry>smgr-md-read-start</entry>
<entry>(ForkNumber, BlockNumber, Oid, Oid, Oid, int)</entry>
+ probe smgr__md__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid,
int, int, int);
<entry>smgr-md-read-done</entry>
<entry>(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int)</entry>
+ probe smgr__md__write__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
<entry>smgr-md-write-start</entry>
<entry>(ForkNumber, BlockNumber, Oid, Oid, Oid, int)</entry>
+ probe smgr__md__write__done(ForkNumber, BlockNumber, Oid, Oid, Oid,
int, int, int);
<entry>smgr-md-write-done</entry>
<entry>(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int)</entry>

buffer-flush-start and buffer-flush-done are documented as only
getting called for shared buffers, so there is no point in passing a
backend ID that will always be -1. buffer-write-dirty-start and
buffer-write-dirty-done are not documented as applying only to shared
buffers, but I believe it to be the case: they are called from
BufferAlloc, which appears to be shared-buffers-only code.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2010-08-15 01:57:03 pgsql: Add link and additional index reference to pgcrypto.
Previous Message Tom Lane 2010-08-14 16:35:15 Re: pgsql: Further dtrace adjustments for the backend-IDs-in-relpath patch.