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

From Tom Lane
Subject Re: invalid tid errors in latest 7.3.4 stable.
Date
Msg-id 16108.1064590259@sss.pgh.pa.us
Whole thread Raw
In response to Re: invalid tid errors in latest 7.3.4 stable.  (Shridhar Daithankar <shridhar_daithankar@persistent.co.in>)
List pgsql-hackers
Shridhar Daithankar <shridhar_daithankar@persistent.co.in> writes:
> If the trigger function is precompiled, the error would not be reproducible 
> and it will work correctly, right?

Only because the trigger in the example doesn't issue any queries of its
own.  If it did, it would cause CommandCounterIncrement(s) anyway.

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

I've thought for some time that it's a bad idea that there is an extra
CCI done when compiling a plpgsql function, because it creates
inconsistencies of behavior.  But getting rid of it does not fix the
fundamental issues here at all, it merely means that this particular
drastically-oversimplified example wouldn't happen to fail.

(IIRC, the extra CCI is actually in spi.c, not in plpgsql, so removing
it could potentially break other code; thus I've hesitated to do it.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: feature request: show pgsql version when running initdb
Next
From: Andreas Pflug
Date:
Subject: Re: [pgsql-hackers-win32] Threads vs Processes