Re: invalid tid errors in latest 7.3.4 stable. - Mailing list pgsql-hackers

From Shridhar Daithankar
Subject Re: invalid tid errors in latest 7.3.4 stable.
Date
Msg-id 200309262002.50323.shridhar_daithankar@persistent.co.in
Whole thread Raw
In response to Re: invalid tid errors in latest 7.3.4 stable.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: invalid tid errors in latest 7.3.4 stable.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Friday 26 September 2003 19:50, Tom Lane wrote:
> Anyway, on to Chris' example.  Load the attached script into a database
> that has plpgsql already created, and then do
>     DELETE FROM Activity WHERE ActivityID = 16739;
> You'll get
>     ERROR:  attempted to mark4update invisible tuple
> (or the equivalent 7.3 message).  This is reproducible so long as you
> start a fresh session each time you attempt the DELETE.  If you try the
> DELETE again in the same session, it will succeed, because the trigger
> function is already compiled and so no CommandCounterIncrement occurs at
> the critical instant.  (It might be possible to make the behavior stable
> by adding some non-SELECT query inside the trigger function to force
> a CommandCounterIncrement to occur anyway.  I haven't tried though.)

I didn't understand exactly the explanation but this last paragraph is bit 
interesting.

If the trigger function is precompiled, the error would not be reproducible 
and it will work correctly, right?

Can we precompile such RI triggers on postmaster startup? Could that be a 
workaround?

Just a thought..
Shridhar



pgsql-hackers by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: feature request: show pgsql version when running initdb
Next
From: Tom Lane
Date:
Subject: Re: feature request: show pgsql version when running initdb