Re: PL/R Median Busts Commit (Postgres 9.1.6 + plr 8.3.0.13 on Ubuntu 12.10 64 bit)

From: Joe Conway <mail(at)joeconway(dot)com>
To: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: PL/R Median Busts Commit (Postgres 9.1.6 + plr 8.3.0.13 on Ubuntu 12.10 64 bit)
Date: 2013-01-24 15:14:19
Message-ID: 51014FCB.30601@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 01/24/2013 05:21 AM, Mark Kirkwood wrote:
> I admit - it sounds unlikely. However a simple scenario (attached) gives
> rise to:

This is the wrong place for the bug report on PL/R I think, but I'll
take a look.

Joe

> WARNING: AbortTransaction while in COMMIT state
> PANIC: cannot abort transaction 880983, it was already committed
>
> Essentially we are doing:
>
> BEGIN;
> DROP TABLE IF EXISTS tab0;
> CREATE TEMP TABLE tab0 ( id INTEGER PRIMARY KEY, val TEXT);
> INSERT INTO tab0 SELECT generate_series(1,1000),'xxxxxxxxxx';
> SELECT median(id) FROM tab0;
> DROP TABLE IF EXISTS tab1;
> CREATE TEMP TABLE tab1 ( id INTEGER PRIMARY KEY, val TEXT);
> INSERT INTO tab1 SELECT generate_series(1,1000),'xxxxxxxxxx';
> DROP TABLE IF EXISTS tab2;
> ...
> DROP TABLE IF EXISTS tab99;
> CREATE TEMP TABLE tab99 ( id INTEGER PRIMARY KEY, val TEXT);
> INSERT INTO tab99 SELECT generate_series(1,1000),'xxxxxxxxxx';
> SELECT median(id) FROM tab99;
> COMMIT;
>
>
> We crash at commit.
>
> Changing median to something else (e.g avg or even a non PLR median
> function) makes the error vanish, so its either PLR or the specific PLR
> median function causing the grief.

--
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Noah Misch 2013-01-24 16:19:54 Re: BUG #6510: A simple prompt is displayed using wrong charset
Previous Message Hari Babu 2013-01-24 15:13:50 Re: Passing connection string to pg_basebackup