| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Heikki Linnakangas <heikki(at)enterprisedb(dot)com> |
| Cc: | pgsql-hackers(at)postgreSQL(dot)org |
| Subject: | Re: Partial vacuum versus pg_class.reltuples |
| Date: | 2009-06-06 22:18:19 |
| Message-ID: | 29485.1244326699@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I wrote:
> Another interesting question is why successive vacuums aren't causing
> the index reltuples counts to go to zero. Shouldn't a partial vacuum
> result in *all* pages of the relation being marked as not needing to
> be examined by the next vacuum?
I figured out the reason for that: the first 32 pages of the table are
always scanned, even if the whole thing is frozen, because of the
SKIP_PAGES_THRESHOLD logic. We could change that behavior by
initializing all_visible_streak to SKIP_PAGES_THRESHOLD instead of zero.
But if we did so then having even just page zero be skippable would mean
that we clear scanned_all and thus fail to update reltuples, which is
probably not a good thing.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Markus Wanner | 2009-06-06 23:03:05 | Re: PostgreSQL Developer meeting minutes up |
| Previous Message | Markus Wanner | 2009-06-06 20:56:47 | Re: PostgreSQL Developer meeting minutes up |