From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: pg_autovacuum integration attempt #2 |
Date: | 2004-07-12 14:53:54 |
Message-ID: | 24288.1089644034@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
"Matthew T. O'Connor" <matthew(at)zeut(dot)net> writes:
> Actually, I intentionally had pg_autovacuum continue to use libpq based
> Tom's advise. Please see this thread:
> http://archives.postgresql.org/pgsql-hackers/2004-03/msg00931.php
> And more specifically, these follow ups:
> http://archives.postgresql.org/pgsql-hackers/2004-03/msg00989.php
> http://archives.postgresql.org/pgsql-hackers/2004-03/msg00992.php
Something seems to have truncated msg00987 in the archives, but I
looked it up in my own mail folder ...
regards, tom lane
------- Forwarded Message
Date: Mon, 22 Mar 2004 16:38:43 -0500
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
cc: "Matthew T. O'Connor" <matthew(at)zeut(dot)net>,
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: [HACKERS] pg_autovacuum next steps
Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> So, do we want a static time, a GUC controlled time or some time which is
> modified by pg_autovacuum's/stat's collector's knowledge of the amount of
> work which goes on in any given database?
From the point of view of the postmaster a GUC-controlled delay would
seem like the best thing. We could discuss having the autovacuum code
try to feed back adjustments in the delay, but remember that one of the
golden virtues for the postmaster proper is simplicity; that translates
directly to robustness. We don't want the postmaster engaging in
anything complicated that could potentially lock it up or crash it due
to a bug.
Possibly this point could be finessed by a two-level structure, that is,
postmaster launches autovacuum daemon (which is not itself a backend)
and that in turn launches backends to do the real per-database work.
The postmaster's only subsequent involvement is restarting the autovac
daemon if it dies. The autovac daemon can be as complex as you want.
This nice-sounding arrangement is probably not directly workable because
of the fact that the postmaster has no good way to know about or control
backends if they aren't its direct children. Perhaps the autovac daemon
*should* use libpq, that is, not fork backends but connect via the
postmaster each time it wants to run a backend. Then the backends are
ordinary children of the postmaster and everything acts normally.
(This could amount to using the existing autovac code, and simply adding
a frammish to the postmaster to autospawn the autovac daemon as a
non-backend child process.)
regards, tom lane
------- End of Forwarded Message
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-07-12 16:05:40 | Re: nested xacts: update password file |
Previous Message | Matthew T. O'Connor | 2004-07-12 14:36:35 | Re: pg_autovacuum integration attempt #2 |