pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Stark <gsstark@mit.edu>
Cc: Aaron Krowne <akrowne@vt.edu>
Cc: Sean Chittenden <sean@chittenden.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: postgresql meltdown on PlanetMath.org
Date: Mon, 17 Mar 2003 11:11:05 -0500
Message-ID: <6661.1047917465@sss.pgh.pa.us> (raw)
In-Reply-To: <87hea2assw.fsf@stark.dyndns.tv>
References: <20030316060125.GD19570@vt.edu>
	<20030316061208.GA62529@perrin.int.nxad.com>
	<20030316080601.GF19570@vt.edu>
	<20030316082024.GA66903@perrin.int.nxad.com>
	<20030316083011.GG19570@vt.edu>
	<19394.1047803852@sss.pgh.pa.us>
	<87hea2assw.fsf@stark.dyndns.tv>

Greg Stark <gsstark@mit.edu> writes:
> Is there any easy way to check an existing table for lost free space?

contrib/pgstattuple gives a pretty good set of statistics.  (I thought
VACUUM VERBOSE printed something about total free space in a table,
but apparently only VACUUM FULL VERBOSE does.  Maybe should change
that.)

> Is there any way vauum could do this check and print a warning suggesting
> using vaccuum full and/or increasing fsm parameters if it finds such?

In CVS tip, a whole-database VACUUM VERBOSE gives info about the free
space map occupancy, eg

INFO:  Free space map: 224 relations, 450 pages stored; 3776 total pages needed.
        Allocated FSM size: 1000 relations + 20000 pages = 178 KB shared mem.

If the "pages needed" number is drastically larger than the allocated
FSM size, you've got a problem.  (I don't think you need to panic if
it's just a little larger, though.  10X bigger would be time to do
something, 2X bigger maybe not.)

			regards, tom lane



view thread (39+ messages)  latest in thread

Message-ID: <6661.1047917465@sss.pgh.pa.us>
Permalink:  ../6661.1047917465@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6661.1047917465@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gsstark@mit.edu, akrowne@vt.edu, sean@chittenden.org
  Subject: Re: postgresql meltdown on PlanetMath.org
  In-Reply-To: <6661.1047917465@sss.pgh.pa.us>
  References: <20030316060125.GD19570@vt.edu> <20030316061208.GA62529@perrin.int.nxad.com> <20030316080601.GF19570@vt.edu> <20030316082024.GA66903@perrin.int.nxad.com> <20030316083011.GG19570@vt.edu> <19394.1047803852@sss.pgh.pa.us> <87hea2assw.fsf@stark.dyndns.tv> <6661.1047917465@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