pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Function won't complete
Date: Sat, 27 Apr 2002 17:36:11 -0400
Message-ID: <7079.1019943371@sss.pgh.pa.us> (raw)
In-Reply-To: <web-1386712@davinci.ethosmedia.com>
References: <web-1386712@davinci.ethosmedia.com>

"Josh Berkus" <josh@agliodbs.com> writes:
> Analysis:
> By upping the debug level and tailing the logs, I could see what was
> happening.  Because all of the activity was taking place inside a
> single function, the database had to be prepared to roll it all back as
> a single transaction.  As a result, with each succeeding operation
> within the function, the calls to the transaction log got longer and
> slower.  

This analysis is nonsense, because PG does not rely on WAL for
transaction rollback, and the amount of WAL activity is *not*
proportional to transaction length.  (At least not since 7.1.2.)

It might be that the real issue is growth of the list of pending
triggers, if you have deferred triggers (eg RI triggers) on the
relations you are updating.  Or it could be something else; since you
say the thing remains I/O-bound, it seems like we must be talking about
tuple access or updates somewhere.  (If VACUUM between steps helps, it
might just be accumulation of dead tuples.)  However, until you drop
your focus on the WAL we'll not find out what's really the bottleneck...

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <7079.1019943371@sss.pgh.pa.us>
Permalink:  ../7079.1019943371@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7079.1019943371@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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com
  Subject: Re: Function won't complete
  In-Reply-To: <7079.1019943371@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