Thread: pgsql: Back-patch fix and test case for bug #7516.
Back-patch fix and test case for bug #7516. Back-patch commits 9afc6481117d2dd936e752da0424a2b6b05f6459 and b8fbbcf37f22c5e8361da939ad0fc4be18a34ca9. The first of these is really a minor code cleanup to save a few cycles, but it turns out to provide a workaround for the misoptimization problem described in bug #7516. The second commit adds a regression test case. Back-patch the fix to all active branches. The test case only works as far back as 9.0, because it relies on plpgsql which isn't installed by default before that. (I didn't have success modifying it into an all-plperl form that still provoked a crash, though this may just reflect my lack of Perl-fu.) Branch ------ REL9_0_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/3d3218aa3d4aa3ef833f60b16548d1e209c778e7 Modified Files -------------- src/pl/plperl/expected/plperl_elog.out | 42 ++++++++++++++++++++++++++++++++ src/pl/plperl/plperl.c | 42 ++++++++++++++----------------- src/pl/plperl/sql/plperl_elog.sql | 30 ++++++++++++++++++++++ 3 files changed, 91 insertions(+), 23 deletions(-)
On 09/14/2012 11:50 AM, Tom Lane wrote: > Back-patch fix and test case for bug #7516. > ... > > Back-patch the fix to all active branches. The test case only works > as far back as 9.0, because it relies on plpgsql which isn't installed > by default before that. (I didn't have success modifying it into an > all-plperl form that still provoked a crash, though this may just reflect > my lack of Perl-fu.) I haven't looked at creating a perl version, but why not just load plpgsql for the tests on the back branches? It would be a simple makefile change. cheers andrew
Andrew Dunstan <andrew@dunslane.net> writes: > On 09/14/2012 11:50 AM, Tom Lane wrote: >> Back-patch the fix to all active branches. The test case only works >> as far back as 9.0, because it relies on plpgsql which isn't installed >> by default before that. (I didn't have success modifying it into an >> all-plperl form that still provoked a crash, though this may just reflect >> my lack of Perl-fu.) > I haven't looked at creating a perl version, but why not just load > plpgsql for the tests on the back branches? It would be a simple > makefile change. Yeah, I had considered that for a second or two, but didn't think it was worth the trouble. 8.x releases are probably unlikely to get installed on platforms that would have this issue. It'd be better if someone could invent a plpgsql-free test case, anyway. I'm not sure offhand why an eval fails to produce similar effects. regards, tom lane