Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function seems to be fixed - Mailing list pgsql-bugs

From Paragon Corporation
Subject Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function seems to be fixed
Date
Msg-id 269A184BAF85437AB5A7FEB076B7211E@O
Whole thread Raw
Responses Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function seems to be fixed
List pgsql-bugs
I wasn't sure if you guys knew or not, but this bug I complained about


http://www.postgresql.org/message-id/3367.1415311625@sss.pgh.pa.us


That would crash with this piece of code seems to have gone

CREATE OR REPLACE FUNCTION crash_test(table_name varchar, column_name
varchar)
  RETURNS bigint AS
$$
DECLARE
 var_result bigint;
BEGIN
       EXECUTE 'ALTER TABLE ' || quote_ident(table_name) || ' ADD COLUMN '
|| quote_ident(column_name) || ' text;';
       var_result = (random()*100000)::bigint;
       RETURN var_result;
END
$$
  LANGUAGE plpgsql VOLATILE
  COST 100;

DROP TABLE IF EXISTS test_1;
CREATE TABLE test_1(id serial primary key);
DROP TABLE IF EXISTS test_crash;
CREATE TEMP TABLE test_crash AS
SELECT 1 As id, crash_test('test_1', 'lyr1') As layer;

INSERT INTO test_crash(id, layer)
SELECT id + 1, crash_test('test_1', 'lyr' || (id + 1)::text)
FROM test_crash
WHERE id = 1;


-- I noticed it when our 9.5 weekly PostGIS bot tests started passing.

I'm guessing its been fixed for a week or so.


Thanks,
Regina

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: PQexec() hangs on OOM
Next
From: David G Johnston
Date:
Subject: Re: BUG #11902: PostgreSQL 9.5 crashes on alter table in function seems to be fixed