Re: pgsql 7.2.3 crash

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: Joe Conway <mail(at)joeconway(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Laurette Cisneros <laurette(at)nextbus(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgsql 7.2.3 crash
Date: 2002-10-14 01:39:05
Message-ID: 200210140139.g9E1d5N16953@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gavin Sherry wrote:
> On Sat, 12 Oct 2002, Joe Conway wrote:
>
> > Tom Lane wrote:
> > > Hackers: we might reasonably fix this by doing a deep copy of the
> > > relcache's trigger info during initResultRelInfo(); or we could fix it
> > > by getting rid of ri_TrigDesc and re-fetching from the relcache every
> > > time. The former would imply that trigger state would remain unchanged
> > > throughout a query, the latter would try to track currently-committed
> > > trigger behavior. Either way has got pitfalls I think.
> > >
> > > The fact that there's a problem at all is because people are using
> > > direct poking of the system catalogs instead of some kind of ALTER TABLE
> > > command to disable/enable triggers; an ALTER command would presumably
> > > gain exclusive lock on the table and thereby delay until active queries
> > > finish. But that technique is out there (even in pg_dump files :-() and
> > > so we'd best try to make the system proof against it.
> > >
> > > Any thoughts on which way to go?
> >
> > I'd say:
> >
> > 1. go with the former
>
> I agree.
>
> > 2. we definitely should also have an ALTER command to allow disable/enable of
> > triggers
>
> I thought this was worked on for 7.3? I remember speaking to someone
> (?) at OSCON because I had been working on 'ENABLE TRIGGER <trigname>' and
> is compliment on the plane. Much of the work seemed to have been in CVS
> already.

It is in TODO:

* Allow triggers to be disabled [trigger]

From the TODO.detail archives, it seems it got stuck on an
implementation issue:

http://candle.pha.pa.us/mhonarc/todo.detail/trigger/msg00001.html

The patch didn't prevent deferred contraint triggers from being fired.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Denis A Ustimenko 2002-10-14 03:32:19 droped out precise time calculations in src/interfaces/libpq/fe-connect.c
Previous Message Tom Lane 2002-10-13 17:10:18 Re: experiences with autocommit functionality in 7.3