X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id B860C11F68F0 for ; Wed, 12 Apr 2006 18:43:03 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.561 X-Spam-Level: X-Spam-Status: No, score=0.561 required=5 tests=[AWL=0.560, HTML_MESSAGE=0.001] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id Y0Mq9u+ctwNO for ; Wed, 12 Apr 2006 18:42:40 -0300 (ADT) X-Greylist: delayed 00:07:28.294525 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 0ED3511F6CAF for ; Wed, 12 Apr 2006 18:41:51 -0300 (ADT) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.207]) by svr4.postgresql.org (Postfix) with ESMTP id EB8365AFA4D for ; Wed, 12 Apr 2006 20:54:41 +0000 (GMT) Received: by xproxy.gmail.com with SMTP id h31so1117534wxd for ; Wed, 12 Apr 2006 13:53:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=h6dZf3Gk4QMDGf9eamwxDQ+jGTk3Nm079K86ejKxJepo2yRPyPRcAb6LdDJfjl+N0i63mA/my2++bxnN4Bd93ZXby87ExDAKYvtyQPRhUnK99zfSbF6M5vKM58wPxY0KdKT5g1cdzCqx8s/AuFeKp94S6Ay2i0wTE0ymYIBYbxY= Received: by 10.70.35.11 with SMTP id i11mr409457wxi; Wed, 12 Apr 2006 13:53:40 -0700 (PDT) Received: by 10.70.87.13 with HTTP; Wed, 12 Apr 2006 13:53:40 -0700 (PDT) Message-ID: <1d219a6f0604121353t1e997628i6e10d00bed4b2354@mail.gmail.com> Date: Wed, 12 Apr 2006 16:53:40 -0400 From: "Chris Hoover" To: "Chris Hoover" , "Anthony Ransley" , "pgsql-admin@postgresql.org" Subject: Re: Autovacuum ideas In-Reply-To: <20060412151553.GD23855@surnet.cl> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11114_11448711.1144875220823" References: <1d219a6f0604111602m62445e60h425c5dd59219606e@mail.gmail.com> <443C39ED.6050706@aurema.com> <1d219a6f0604120753h1cabb4c2n60f53403225dcf81@mail.gmail.com> <20060412151553.GD23855@surnet.cl> X-Archive-Number: 200604/114 X-Sequence-Number: 21283 ------=_Part_11114_11448711.1144875220823 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I love this idea. I think on initial consideration it might have a lot of merit. You could have a setup something like: pg_av_grp -- table of group names avgrpname varchar(50) -- group name pg_av_grp_window -- time windows when not to vacuum the group of tables avgrpwinrelid =3D pg_av_group.oid no_run_start time - starting of exclusion block no_run_stop time - stopping of exclusion block no_run_day - day(s) of this exclusion pg_av_grp_rel -- the list of tables in a group avgrprelid =3D pg_av_grp.oid avgrptabid =3D pg_class.oid Something like this structure would allow you a lot of flexibility in building your auto vacuum groups. You can define your groups with the ability to have multiple windows per group. This would allow you to basically have rules like this: big_group - table_a, table_b, table_f no_run_start 08:00 no_run_stop 17:00 no_run_day (mon-fri) -- don't vacuum the big group tables during the M-F work hours load_group - table_c, table_d, table_e no_run_start 06:00 no_run_stop 08:00 no_run_day (mon-sun) no_run_start 18:00 no_run_stop 20:00 no_run_day (mon-sun) -- don't vacuum the main tables we load during the 2 load windows. Tables not in a group would be in a default group that could be vacuumed at any time as needed. I'm not really a C programmer, so I don't know what the internals would tak= e to accomplish this, but maybe it can spur some thought and development. Chris On 4/12/06, Alvaro Herrera wrote: > > > I don't think autovacuum will be on by default until we have a way to > configure rush hours, maintenance windows, etc. > > The system I envision has tables grouped in some way, and maintenance > windows would operate on table groups. For example you will be able to > include the fat table in a (possibly otherwise empty) group, and have > that group not be processed during "work hours"; the rest of the tables > would continue to be vacuumed at all times. > > -- > Alvaro Herrera > http://www.CommandPrompt.com/ > PostgreSQL Replication, Consulting, Custom Development, 24x7 support > ------=_Part_11114_11448711.1144875220823 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I love this idea.  I think on initial consideration it might have a lo= t of merit.  You could have a setup something like:

pg_av_grp -= - table of group names
avgrpname varchar(50) -- group name

pg_av_= grp_window -- time windows when not to vacuum the group of tables
avgrpwinrelid =3D pg_av_group.oid
no_run_start time - starting of ex= clusion block
no_run_stop time - stopping of exclusion block
no_run_d= ay <not sure of format> - day(s) of this exclusion

pg_av_grp_r= el -- the list of tables in a group
avgrprelid =3D pg_av_grp.oid
avgrptabid =3D pg_class.oid

Some= thing like this structure would allow you a lot of flexibility in building = your auto vacuum groups.  You can define your groups with the ability = to have multiple windows per group.

This would allow you to basically have rules like this:
big_grou= p - table_a, table_b, table_f
no_run_start 08:00
no_run_stop 17:00no_run_day (mon-fri)
-- don't vacuum the big group tables during the M-= F work hours

load_group - table_c, table_d, table_e
no_run_start 06:00
no_= run_stop 08:00
no_run_day (mon-sun)

no_run_start 18:00
no_run_= stop 20:00
no_run_day (mon-sun)

-- don't vacuum the main tables w= e load during the 2 load windows.

Tables not in a group would be in a default group that could be vac= uumed at any time as needed.

I'm not really a C programmer, so I don= 't know what the internals would take to accomplish this, but maybe it can = spur some thought and development.

Chris



On 4/12/06, <= b class=3D"gmail_sendername">Alvaro Herrera <alvherre@commandprompt.com> wrote:
I don't think autovacuum will be on by default until we have a way toconfigure rush hours, maintenance windows, etc.

The system I envis= ion has tables grouped in some way, and maintenance
windows would operat= e on table groups.  For example you will be able to
include the fat table in a (possibly otherwise empty) group, and havethat group not be processed during "work hours"; the rest of th= e tables
would continue to be vacuumed at all times.

--
Alvaro= Herrera           &= nbsp;           &nbs= p;         http://www.CommandPrompt.com/=
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

------=_Part_11114_11448711.1144875220823--