pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Jeff Boes <jboes@nexcerpt.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Long-running DELETE
Date: Wed, 16 Jan 2002 07:14:24 -0800 (PST)
Message-ID: <20020116071240.U43837-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <20020116083828.2b323ec7.jboes@nexcerpt.com>

On Wed, 16 Jan 2002, Jeff Boes wrote:

> On Tue, 15 Jan 2002 21:13:49 -0800 (PST)
> Stephan Szabo <sszabo@megazone23.bigpanda.com> wrote:
>
> >
> > On 15 Jan 2002, Jeff Boes wrote:
> >
> > > update pg_triggers set tgenabled=false;
> >
> > I don't think tgenabled works.  You'll probably need to set reltriggers to
> > 0 on the pg_class row for the table (and then reset it to the correct
> > value afterwards).
> >
>
> I can't confirm that one, but I did find that things got a lot faster
> when I also did
>
>   update pg_trigger
>   set tgenabled=false,
>     tgdeferrable=true,
>     tginitdeferred=true
>
> for each of the associated triggers.

Hmm, that'd make the actual trigger calls wait till end of transaction.
If you were running the deletes in a transaction, that'd make the delete
parts go faster, but the commit should take a while.





view thread (5+ messages)

Message-ID: <20020116071240.U43837-100000@megazone23.bigpanda.com>
Permalink:  ../20020116071240.U43837-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020116071240.U43837-100000@megazone23.bigpanda.com

 · 

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: sszabo@megazone23.bigpanda.com, jboes@nexcerpt.com
  Subject: Re: Long-running DELETE
  In-Reply-To: <20020116071240.U43837-100000@megazone23.bigpanda.com>

* 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