Re: Some thoughts about i/o priorities and throttling vacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Some thoughts about i/o priorities and throttling vacuum
Date: 2003-10-17 14:50:16
Message-ID: 22689.1066402216@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> Maybe in this case it's best to do a VACUUM FREEZE; that'd ensure that
> the table would never ever need a vacuum again until it suffers
> an insert, delete or update.

But how would you keep track of that? Certainly an external autovacuum
daemon couldn't know for sure that the table had never been modified
since it was frozen. I suppose you could think about altering the
backend to mark a table "dirty" whenever an insert/update/delete is
done, but I'd have to think this would be a net waste of cycles in the
vast majority of cases. How many people have tables that are *really*
read-only over the long haul (billions of transactions)?

I think the existing approach of forcing a database-wide vacuum every
billion or so transactions is probably the most efficient way of dealing
with the issue. It's almost certainly cheaper, net, than any scheme
that adds even a tiny overhead to each individual insert/update/delete.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jean-Michel POURE 2003-10-17 14:52:20 Re: Mapping Oracle types to PostgreSQL types
Previous Message Matthew T. O'Connor 2003-10-17 14:47:29 Re: Some thoughts about i/o priorities and throttling vacuum