From: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
To: Greg Stark <gsstark@mit.edu>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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: Mon, 02 May 2011 21:05:25 +0200
Message-ID: <m2zkn4udmy.fsf@2ndQuadrant.fr> (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:
> So is it ok for inserting one row to cause my table to grow by 90GB?
> 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?
I'd think that capping the idea to the segment size makes sense.
Also, what about having a background process (bgwriter or autovacuum
come to mind) doing the work, rather than the backend that happens to be
inserting the row?
It could send a message, and continue creating a newer 8kb block if the
background process has not yet extended the storage. Also, to be safe I
guess we could arrange to have the new segment be created way before
reaching the very end of the relation (so that adding 8kb does not need
to create a new segment, so as to avoid a race condition with the
background process doing so itself).
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
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: dimitri@2ndQuadrant.fr, gsstark@mit.edu, 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: <m2zkn4udmy.fsf@2ndQuadrant.fr>
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> <m2zkn4udmy.fsf@2ndQuadrant.fr>
* 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