From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
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 15:43:58 -0400
Message-ID: <15329.1301082238@sss.pgh.pa.us> (raw)
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>
Alvaro Herrera <alvherre@commandprompt.com> writes:
> 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?
I don't recall any particular discussion of making the user contend with
that. My thought would be to do something like enlarging the table by
10% anytime we need to extend it. The main issue here is where to cause
that to happen. An individual backend that just wants to store one more
tuple probably shouldn't have to do that much work.
> 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.
Yeah. I did think of a small problem with just letting autovac get
blown off the lock: it will fail to send the stats messages about what
it's done, which will likely result in a near-immediate launch of a new
autovacuum against the table. It'd be better to complete the autovacuum
and then try to do the truncation in an independent transaction.
regards, tom lane
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: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, cbbrowne@gmail.com, maxim.boguk@gmail.com
Subject: Re: BUG #5946: Long exclusive lock taken by vacuum (not full)
In-Reply-To: <15329.1301082238@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> <1301080686-sup-7539@alvh.no-ip.org> <15329.1301082238@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