pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: Craig Ringer <craig@postnewspapers.com.au>
Cc: pgsql-patches <pgsql-patches@postgresql.org>
Subject: Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit
Date: Wed, 12 Mar 2008 13:22:13 -0400
Message-ID: <23603.1205342533@sss.pgh.pa.us> (raw)
In-Reply-To: <2e78013d0803121002o2b7a8531y1553ce66cb6d1537@mail.gmail.com>
References: <47D505AF.4040101@postnewspapers.com.au>
	<23588.1205159638@sss.pgh.pa.us>
	<47D54A47.3030608@postnewspapers.com.au>
	<47D54DB2.4020405@enterprisedb.com>
	<24304.1205162440@sss.pgh.pa.us>
	<47D67C3F.1030406@enterprisedb.com>
	<5827.1205269597@sss.pgh.pa.us>
	<47D7DE12.80700@enterprisedb.com>
	<2e78013d0803120847k2e8afbedrc39e29e5194d3c6e@mail.gmail.com>
	<19902.1205337439@sss.pgh.pa.us>
	<2e78013d0803121002o2b7a8531y1553ce66cb6d1537@mail.gmail.com>

"Pavan Deolasee" <pavan.deolasee@gmail.com> writes:
> On Wed, Mar 12, 2008 at 9:27 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> and it would have problems with a slow transaction
>> generating a sparse set of subtransaction XIDs.

> I agree thats the worst case. But is that common ? Thats what I
> was thinking when I proposed the alternate solution. I thought that can
> happen only if most of the subtransactions abort, which again I thought
> is not a normal case.

No, I was thinking of the case where other sessions are chewing up XIDs
while the lots-of-subtransactions transaction runs.  If it's slow
enough, there could be very large gaps between the XIDs it acquires for
its subtransactions.  So you'd have a situation where the exact same
transaction processing might or might not run out of memory depending
on what else happened meanwhile.  Not a very pleasant property.

			regards, tom lane



view thread (30+ messages)  latest in thread

Message-ID: <23603.1205342533@sss.pgh.pa.us>
Permalink:  ../23603.1205342533@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23603.1205342533@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pavan.deolasee@gmail.com, heikki@enterprisedb.com, craig@postnewspapers.com.au, pgsql-patches@postgresql.org
  Subject: Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit
  In-Reply-To: <23603.1205342533@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