Обсуждение: RE: Re: [GENERAL] Vacuum and Transactions

Поиск
Список
Период
Сортировка

RE: Re: [GENERAL] Vacuum and Transactions

От
"Christopher Kings-Lynne"
Дата:
> That might happen eventually, but I'm not all that eager to convert
> the postmaster into a (half-baked) substitute for cron.  My experience
> as a dbadmin is that you need various sorts of routinely-run maintenance
> tasks anyway; VACUUM is only one of them.  So you're gonna need some
> cron tasks no matter what.  If we try to make the postmaster responsible
> for this sort of thing, we're going to end up reimplementing cron.
> I think that's a waste of effort.

Except that you can only set cron jobs to run every hour, etc.  The DBA
might want to set it to run after say 5% of the rows in a table are
updated/deleted, etc.  It is an esoteric feature, I know, but it'd be cool.

Chris



Re: Re: [GENERAL] Vacuum and Transactions

От
Bruce Momjian
Дата:
> > That might happen eventually, but I'm not all that eager to convert
> > the postmaster into a (half-baked) substitute for cron.  My experience
> > as a dbadmin is that you need various sorts of routinely-run maintenance
> > tasks anyway; VACUUM is only one of them.  So you're gonna need some
> > cron tasks no matter what.  If we try to make the postmaster responsible
> > for this sort of thing, we're going to end up reimplementing cron.
> > I think that's a waste of effort.
> 
> Except that you can only set cron jobs to run every hour, etc.  The DBA
> might want to set it to run after say 5% of the rows in a table are
> updated/deleted, etc.  It is an esoteric feature, I know, but it'd be cool.

I don't think it is esoteric.  If I UPDATE all the rows in a table,
COMMIT, and all transactions viewing old versions of my table are gone,
it would be nice for VACUUM-light to come alone and gather up my free
tuple space for later use.  

Only the database knows when this has happened, not cron.

I also think we have to leave VACUUM alone and come up with a new name
for our light VACUUM.  That way, people who do VACUUM at night when no
one is on the system can keep doing that, and just add something to run
light vacuum periodically during the day.  I also believe eventually we
will remove VACUUM-light and come up with some automatic solution.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026