pg.ddx.io  pgsql-bugs@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: 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 17:34:52 -0400
Message-ID: <16369.1301088892@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTik11YkL2Otst7Uf0f-_3+YmTh6O8tFyg8CnQ5o2@mail.gmail.com>
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>
	<AANLkTimuzhLR64DiNJq8QcMpgKBBmuW6eiErqZCVp+jk@mail.gmail.com>
	<16028.1301086103@sss.pgh.pa.us>
	<AANLkTik11YkL2Otst7Uf0f-_3+YmTh6O8tFyg8CnQ5o2@mail.gmail.com>

Greg Stark <gsstark@mit.edu> writes:
> On Fri, Mar 25, 2011 at 8:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Interesting, but I don't understand/believe your argument as to why this
>> is a bad idea or fixed-size extents are better.  It sounds to me just
>> like the typical Oracle DBA compulsion to have a knob to twiddle.  A
>> self-adjusting enlargement behavior seems smarter all round.

> So is it ok for inserting one row to cause my table to grow by 90GB?

If the table is already several TB, why not?  The whole point here is
that it's very unlikely that you're not going to be inserting more rows
pretty soon.

> Or should there be some maximum size increment at which it stops
> growing? What should that maximum be? What if I'm on a big raid system
> where that size doesn't even add a block to every stripe element?

> Say you start with 64k (8 pg blocks). That means your growth
> increments will be 64k, 70k, 77kl, 85k, 94k, 103k, 113k, 125k, 137k,
> ...

I have no problem with trying to be smart about allocating in powers of
2, not allocating more than X at a time, etc etc.  I'm just questioning
the idea that the user should be bothered with this, or is likely to be
smarter than the system about such things.  Particularly if you believe
that this problem actually justifies attention to such details.  I think
you've already demonstrated that a simplistic fixed-size allocation
parameter probably *isn't* good enough.

			regards, tom lane



view thread (30+ messages)  latest in thread

Message-ID: <16369.1301088892@sss.pgh.pa.us>
Permalink:  ../16369.1301088892@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16369.1301088892@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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gsstark@mit.edu, 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: <16369.1301088892@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> <AANLkTimuzhLR64DiNJq8QcMpgKBBmuW6eiErqZCVp+jk@mail.gmail.com> <16028.1301086103@sss.pgh.pa.us> <AANLkTik11YkL2Otst7Uf0f-_3+YmTh6O8tFyg8CnQ5o2@mail.gmail.com> <16369.1301088892@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