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