| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-patches(at)postgreSQL(dot)org |
| Subject: | Proposed patch for ANALYZE overcounting dead rows |
| Date: | 2007-11-16 22:58:23 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
There's been a thread in pgsql-performance about ANALYZE reporting an
overly large number of dead rows because it counts anything that's not
visible-per-SnapshotNow-rules as "dead", in particular
insert-in-progress tuples are reported as "dead". This seems a bad
idea because it may prompt autovacuum to launch a useless vacuum.
The attached patch revises ANALYZE to distinguish tuple states the same
way VACUUM does, and to not count INSERT_IN_PROGRESS nor
DELETE_IN_PROGRESS tuples as either "live" or "dead".
Comments? In particular, should we report a count of in-doubt tuples in
the eventual LOG message, and does anyone want to argue for still
counting DELETE_IN_PROGRESS as "dead"?
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| unknown_filename | text/plain | 6.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Euler Taveira de Oliveira | 2007-11-17 19:53:53 | wrong behavior using to_char() again |
| Previous Message | Alvaro Herrera | 2007-11-16 19:17:28 | Re: pg_ctl -t N register ?? |