Re: Coding help

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: matthew(at)zeut(dot)net
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Coding help
Date: 2002-08-16 05:50:21
Message-ID: 4867.1029477021@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Matthew T. O'Connor" <matthew(at)zeut(dot)net> writes:
> I have gotten as far as having a vacuum daemon created on postmaster startup.
> It's just a fork from the postmaster, cribbed mostly from the stat collector
> code.

This will not get you very far, because the stat collector is not a real
backend. The checkpointer process might be a better example, but it's
not quite a real backend either. You need to be a real backend to
access shared buffers, locking, etc.

> I don't understand why it thinks I'm in a function,

Because CurrentMemoryContext is not QueryContext (presumably you never
set QueryContext at all). This is a pretty cheesy test but I can't
think of a better one offhand...

regards, tom lane

In response to

  • Coding help at 2002-08-16 04:02:02 from Matthew T. O'Connor

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-16 05:56:41 Re: Open 7.3 issues
Previous Message Christopher Kings-Lynne 2002-08-16 05:42:41 Re: SET SCHEMA?