pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christopher Browne <cbbrowne@gmail.com>
Cc: Maxim Boguk <maxim.boguk@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #5946: Long exclusive lock taken by vacuum (not full)
Date: Fri, 25 Mar 2011 16:26:33 -0300
Message-ID: <1301080686-sup-7539@alvh.no-ip.org> (raw)
In-Reply-To: <13556.1301069421@sss.pgh.pa.us>
References: <201103250856.p2P8ufGc004544@wwwmaster.postgresql.org>
	<4345.1301066239@sss.pgh.pa.us>
	<AANLkTimiCkmZ5NL=iPUG08TRAd-OJp_M1sR2SCm6c2BL@mail.gmail.com>
	<13556.1301069421@sss.pgh.pa.us>

Excerpts from Tom Lane's message of vie mar 25 13:10:21 -0300 2011:
> Christopher Browne <cbbrowne@gmail.com> writes:

> > If there's almost always something that wants to access the table,
> > which would be hardly surprising, in view that the table is being
> > updated with sufficient regularity that it's got 10GB+ of dead space
> > at the end, then you're eventually going to *HAVE* to vacuum it.
> > Transaction rollover, and what not.
> 
> It is already vacuumed.  The only remaining step is to release free
> space back to the OS; and if he's got a lot of churn in the table,
> it's not entirely clear that that's a productive activity anyway.

Right: future new tuples could need to extend the table, which would
turn out not to be necessary because these pages at the end of the table
are there and registered on the FSM.  Truncating the table could turn
out to be conterproductive because you would allocate a new block
shortly, causing FS fragmentation.

What happened to the idea of preallocating tables to a size defined by
the user at CREATE TABLE time, and extending it in chunks instead of a
block at a time, with the idea of reducing fragmentation?  Was it
rejected, or just not implemented?

The other possibly useful idea was to let this truncate step to be run
as a separate activity, without having to complete a vacuum cycle on the
table.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (30+ messages)  latest in thread

Message-ID: <1301080686-sup-7539@alvh.no-ip.org>
Permalink:  ../1301080686-sup-7539@alvh.no-ip.org/
Also on:    postgresql.org/message-id/1301080686-sup-7539@alvh.no-ip.org

 · 

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-bugs@postgresql.org
  Cc: alvherre@commandprompt.com, tgl@sss.pgh.pa.us, cbbrowne@gmail.com, maxim.boguk@gmail.com
  Subject: Re: BUG #5946: Long exclusive lock taken by vacuum (not full)
  In-Reply-To: <1301080686-sup-7539@alvh.no-ip.org>
  References: <201103250856.p2P8ufGc004544@wwwmaster.postgresql.org> <4345.1301066239@sss.pgh.pa.us> <AANLkTimiCkmZ5NL=iPUG08TRAd-OJp_M1sR2SCm6c2BL@mail.gmail.com> <13556.1301069421@sss.pgh.pa.us> <1301080686-sup-7539@alvh.no-ip.org>

* 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