Re: Other queries locked out during long insert

From: "Joshua J(dot) Kugler" <joshua(at)eeinternet(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Other queries locked out during long insert
Date: 2008-12-17 20:11:43
Message-ID: 200812171111.43881.joshua@eeinternet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday 17 December 2008, Peter Eisentraut said something like:
> Because the TRUNCATE commands are taking out an exclusive lock on the
> tables.
>
> > My understanding of MVCC is that I should be able to query against
> > those tables while these insert loops are in their transaction.
>
> You get the MVCC behavior if you use DELETE instead of TRUNCATE.
> TRUNCATE is specifically designed for better speed and less
> concurrency. It's your choice.

OK, that makes sense. There was nothing on the TRUNCATE page to suggest
that TRUNCATE would lock the tables. Maybe an addition to the
documentation is in order? Where do I go to suggest that?

Thanks again!

j

--
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/  ID 0xDB26D7CE

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message justin 2008-12-17 20:13:41 Re: Syntax error with select statement
Previous Message Thomas Kellerer 2008-12-17 20:07:37 Re: A bit confused about Postgres Plus