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

Started by Tom Laneabout 25 years ago5 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

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.

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#1)
Re: pgsql/src include/nodes/execnodes.h include/ex ...

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

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#2)
Re: pgsql/src include/nodes/execnodes.h include/ex ...

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

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#3)
Re: pgsql/src include/nodes/execnodes.h include/ex ...

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

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#4)
Re: pgsql/src include/nodes/execnodes.h include/ex ...

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