Re: A sniffer for the buffer - Mailing list pgsql-hackers

From Daniel Farina
Subject Re: A sniffer for the buffer
Date
Msg-id 7b97c5a40912071944t7be135b9uae8ca070b1cf4e8d@mail.gmail.com
Whole thread Raw
In response to Re: A sniffer for the buffer  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-hackers
On Sun, Dec 6, 2009 at 9:04 AM, Greg Smith <greg@2ndquadrant.com> wrote:
> And that won't work at all.  "Buffer" is a structure, not an integer.  You
> need to wait until it's been locked, then save the same data as on the read
> side (relation and block number) from inside the structure.  You probably
> want to hook FlushBuffer to do that job.  In fact, there's already a DTrace
> probe in there you could easily use to collect the data you want without
> even touching the source code if you can get a DTrace capable system.  Note
> the following code in bufmgr.c FlushBuffer:

Apropos DTrace:  I have just today compiled Postgres 8.3 with
--enable-dtrace on an Ubuntu 9.10 machine with no issues or
workarounds.  I just had to install the package systemtap-sdt-dev.

I haven't tried to do anything with it just yet though...

fdr


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Adding support for SE-Linux security
Next
From: Greg Smith
Date:
Subject: Re: EXPLAIN BUFFERS