Re: Re: BUG #5480: Autovacuum interferes with operations (e.g. truncate) on very large databases

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "Sakari A(dot) Maaranen" <sam(at)iki(dot)fi>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Re: BUG #5480: Autovacuum interferes with operations (e.g. truncate) on very large databases
Date: 2010-05-30 03:50:23
Message-ID: AANLkTimF3OBQPjkRqfAW095agLUJ0-p2rTQlf7yaUX6i@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, May 29, 2010 at 5:44 PM, Sakari A. Maaranen <sam(at)iki(dot)fi> wrote:
> For now, I can work around this on the client side by splitting the
> updates into a million separate transactions instead of a single big
> one. Will be slow, but it should work.

In general, it's better to group things into larger transactions - the
case where the pending trigger queue exhausts system memory is an
unfortunate exception. You might want to think about, say, a thousand
transactions of a thousand records, instead of a million transactions
with one record each.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Matthew Nourse 2010-05-30 09:53:52 Re: BUG #5477: CREATE DOMAIN NOT NULL constraints not always enforced for INSERT with subquery
Previous Message Robert Haas 2010-05-30 03:45:45 Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation