pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Florian Helmberger <fh@25th-floor.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Date: Fri, 27 May 2011 14:34:10 -0400
Message-ID: <17685.1306521250@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTinREie2cX2zqZPSEfUsZsdM+GjymQ@mail.gmail.com>
References: <4DD28F73.6010108@25th-floor.com>
	<25017.1306291669@sss.pgh.pa.us>
	<4DDCA801.70805@25th-floor.com>
	<19738.1306338472@sss.pgh.pa.us>
	<BANLkTi=973Arh-nXLO6YFP7_ZTCeNp-X7w@mail.gmail.com>
	<22497.1306341699@sss.pgh.pa.us>
	<BANLkTi=jcKSU5zR+JG2BvfLNCtezC9sb+g@mail.gmail.com>
	<15043.1306423500@sss.pgh.pa.us>
	<BANLkTikrCaoZCVrda6SNCUQFiYvvZX75BA@mail.gmail.com>
	<25097.1306426982@sss.pgh.pa.us>
	<BANLkTikxM6V5DUsXnDEs84z=oRMbyeoOgA@mail.gmail.com>
	<4DDE475B020000250003DD63@gw.wicourts.gov>
	<BANLkTikTbZ8gibj+X++vkdqkxxJCU6trWw@mail.gmail.com>
	<4DDE5033020000250003DD71@gw.wicourts.gov>
	<BANLkTikGu30z1rwYeN0NwuO8jMFWHzus+Q@mail.gmail.com>
	<4DDE7EB8020000250003DDA8@gw.wicourts.gov>
	<9007.1306446600@sss.pgh.pa.us>
	<BANLkTinREie2cX2zqZPSEfUsZsdM+GjymQ@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> Still, maybe we don't have a better option.  If it were me, I'd add an
> additional safety valve: use your formula if the percentage of the
> relation scanned is above some threshold where there's unlikely to be
> too much skew.  But if the percentage scanned is too small, then don't
> use that formula.  Instead, only update relpages/reltuples if the
> relation is now larger; set relpages to the new actual value, and
> scale up reltuples proportionately.

Ah, progress: now we're down to arguing about the size of the fudge
factor ;-).  I'll do something involving derating the reliability
when the number is coming from VACUUM.

			regards, tom lane



view thread (48+ messages)  latest in thread

Message-ID: <17685.1306521250@sss.pgh.pa.us>
Permalink:  ../17685.1306521250@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17685.1306521250@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, Kevin.Grittner@wicourts.gov, fh@25th-floor.com, alvherre@commandprompt.com, gsstark@mit.edu, pgsql-hackers@postgresql.org
  Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
  In-Reply-To: <17685.1306521250@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox