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

From Robert Haas
Subject Re: pgsql: Further dtrace adjustments for the backend-IDs-in-relpath patch.
Date
Msg-id AANLkTi=E=42-Ux=n=R5TGXf2WiiwHw8Z22JJeW3JNOk9@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Further dtrace adjustments for the backend-IDs-in-relpath patch.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Further dtrace adjustments for the backend-IDs-in-relpath patch.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Sat, Aug 14, 2010 at 12:35 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> rhaas@postgresql.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

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Further dtrace adjustments for the backend-IDs-in-relpath patch.
Next
From: rhaas@postgresql.org (Robert Haas)
Date:
Subject: pgsql: Add link and additional index reference to pgcrypto.