Segfault when creating partition with a primary key and sql_droptrigger exists
От | Marco Slot |
---|---|
Тема | Segfault when creating partition with a primary key and sql_droptrigger exists |
Дата | |
Msg-id | CANNhMLCpi+HQ7M36uPfGbJZEQLyTy7XvX=5EFkpR-b1bo0uJew@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Segfault when creating partition with a primary key and sql_droptrigger exists
Re: Segfault when creating partition with a primary key and sql_droptrigger exists |
Список | pgsql-hackers |
We're seeing a segmentation fault when creating a partition of a partitioned table with a primary key when there is a sql_drop trigger on Postgres 11beta4.
We discovered it because the Citus extension creates a sql_drop trigger, but it's otherwise unrelated to the Citus extension:
https://github.com/citusdata/citus/issues/2390
To reproduce:
CREATE OR REPLACE FUNCTION on_drop()
https://github.com/citusdata/citus/issues/2390
To reproduce:
CREATE OR REPLACE FUNCTION on_drop()
RETURNS event_trigger AS $ondrop$
BEGIN
RAISE NOTICE 'drop_trigger';
END;
$ondrop$ LANGUAGE plpgsql;
CREATE EVENT TRIGGER fail_drop_table ON sql_drop
BEGIN
RAISE NOTICE 'drop_trigger';
END;
$ondrop$ LANGUAGE plpgsql;
CREATE EVENT TRIGGER fail_drop_table ON sql_drop
EXECUTE PROCEDURE on_drop();
CREATE TABLE collections_list (
key bigint,
ts timestamptz,
collection_id integer,
value numeric,
PRIMARY KEY(collection_id)
) PARTITION BY LIST ( collection_id );
CREATE TABLE collections_list_1
PARTITION OF collections_list (key, ts, collection_id, value)
FOR VALUES IN (1);
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
Marco
CREATE TABLE collections_list (
key bigint,
ts timestamptz,
collection_id integer,
value numeric,
PRIMARY KEY(collection_id)
) PARTITION BY LIST ( collection_id );
CREATE TABLE collections_list_1
PARTITION OF collections_list (key, ts, collection_id, value)
FOR VALUES IN (1);
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
Marco
В списке pgsql-hackers по дате отправления: