Re: A sniffer for the buffer

From: Daniel Farina <drfarina(at)gmail(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: autoramajj(at)hotmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: A sniffer for the buffer
Date: 2009-12-08 03:44:54
Message-ID: 7b97c5a40912071944t7be135b9uae8ca070b1cf4e8d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 6, 2009 at 9:04 AM, Greg Smith <greg(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message 黄晓骋 2009-12-08 04:05:45 questions about concurrency control in Postgresql
Previous Message Greg Smith 2009-12-08 03:25:48 Re: Adding support for SE-Linux security