Thread: pgsql/src include/nodes/execnodes.h include/ex ...

pgsql/src include/nodes/execnodes.h include/ex ...

From
Tom Lane
Date:
CVSROOT:    /home/projects/pgsql/cvsroot
Module name:    pgsql
Changes by:    tgl@hub.org    01/05/27 16:48:51

Modified files:
    src/include/nodes: execnodes.h
    src/include/executor: executor.h
    src/backend/executor: execMain.c execJunk.c

Log message:
    When using a junkfilter, the output tuple should NOT be stored back into
    the same tuple slot that the raw tuple came from, because that slot has
    the wrong tuple descriptor.  Store it into its own slot with the correct
    descriptor, instead.  This repairs problems with SPI functions seeing
    inappropriate tuple descriptors --- for example, plpgsql code failing to
    cope with SELECT FOR UPDATE.


Re: pgsql/src include/nodes/execnodes.h include/ex ...

From
Peter Eisentraut
Date:
Tom Lane writes:

> Peter Eisentraut <peter_e@gmx.net> writes:
> > Was this responsible for an occasional
> > NOTICE:  AllocSetCheck: JunkFilterContext: req size > alloc size for chunk %p in block %p
> > during UPDATE?
>
> No, I don't think that's related.  Can you provide a reproducible
> example?

I've been seeing these regularly when compiling with GCC 3.0-to-be
snapshots with full optimization.  The notices came in the regression test
at various places, always during update.  Today, they're gone, with the
same compiler as yesterday.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Re: pgsql/src include/nodes/execnodes.h include/ex ...

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> Was this responsible for an occasional
> NOTICE:  AllocSetCheck: JunkFilterContext: req size > alloc size for chunk %p in block %p
> during UPDATE?

No, I don't think that's related.  Can you provide a reproducible
example?

            regards, tom lane

Re: pgsql/src include/nodes/execnodes.h include/ex ...

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> I've been seeing these regularly when compiling with GCC 3.0-to-be
> snapshots with full optimization.  The notices came in the regression test
> at various places, always during update.  Today, they're gone, with the
> same compiler as yesterday.

Ugh.  That sounds like a memory clobber to me --- and no, I don't
believe that my changes yesterday fixed it.

            regards, tom lane

Re: pgsql/src include/nodes/execnodes.h include/ex ...

From
Peter Eisentraut
Date:
Tom Lane writes:

> Log message:
>     When using a junkfilter, the output tuple should NOT be stored back into
>     the same tuple slot that the raw tuple came from, because that slot has
>     the wrong tuple descriptor.  Store it into its own slot with the correct
>     descriptor, instead.  This repairs problems with SPI functions seeing
>     inappropriate tuple descriptors --- for example, plpgsql code failing to
>     cope with SELECT FOR UPDATE.

Was this responsible for an occasional

NOTICE:  AllocSetCheck: JunkFilterContext: req size > alloc size for chunk %p in block %p

during UPDATE?

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter