Re: pg_autovacuum next steps

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_autovacuum next steps
Date: 2004-03-22 22:43:04
Message-ID: 10301.1079995384@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:
> Tom Lane wrote:
>> There is no "direct pipe connection" to the stats collector,

> I probably said that wrong, but how do backends get their stats data?

They read it out of a flat file that the stats collector rewrites every
so often.

> Meaning, when I do a "select * from pg_stat_all_tables" how is the
> backend getting that data. The reason I'm interested is that if I don't
> have to fire up a backend just to check the stats that would reduce the
> load associated with the autovacuum daemon.

Is that really worth the loss of independence? I'm not sure one way or
the other myself. I suppose the autovac daemon could still be run by
hand for testing purposes, but it would have to run as user postgres and
on the same machine as the postmaster.

> Right, I think the overhead would be negligible. Since you seem to
> think this is (or at least might be) a good idea, I will go ahead and
> try to get the postmaster to fire-up the autovacuum daemon. So that the
> 1st cut, will basically be pg_autovacuum exactly as it stands now, just
> launched by the postmaster.

> Also, you didn't mention if I will be able to use the backend logging
> functions, I would guess that I can, but I'm not totally sure.

Yes, if you are launched by the postmaster then you'd have access to its
stderr etc, so you could just log via elog/ereport. Again though this
puts you in a situation where the daemon *must* be launched by the
postmaster or it won't work. How much arm's-length separation are you
willing to give up?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2004-03-22 22:43:36 Re: Thoughts about updateable views
Previous Message Bernd Helmle 2004-03-22 22:36:30 Re: Thoughts about updateable views