segfault with plproxy

From: Filip Rembiałkowski <filip(dot)rembialkowski(at)gmail(dot)com>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: segfault with plproxy
Date: 2011-12-17 21:25:40
Message-ID: CAP_rww=M-MV_2GGWQEFg=T5bm7Vkd6K9hq+MBebqBAKC6eLf7Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have a problem with PL/Proxy
(sorry for not posting to plproxy-users, but I have some problem
subscribing there).

I try to use it to achieve "single node paralellism"
- as MattK nicely put it on
http://dba.stackexchange.com/questions/9097/single-node-parallelism-with-pl-proxy

My setup is:
-- Ubuntu 10.04
-- PostgreSQL 9.1.2 + PL/Proxy 2.3, both compiled from source and
installed to $HOME/pg91/
-- Data directory in $HOME/pgdata91/
-- config all default except port=5910 plus logging

Following scrip causes segmentation fault. Any ideas why / how to diagnose?

drop database if exists testdb;
create database testdb;
drop user if exists part0;
create user part0;
drop user if exists part1;
create user part1;

\c testdb

-- master table
create table public.users(id serial primary key, name text not null);

-- part0
create schema authorization part0;
create table part0.users( check(id%2=0) ) inherits (public.users);
create or replace function part0.list_users(condition text)
returns table(id int,name text) language sql as $$
select id,name from part0.users where name like $1;
$$;
grant all on all tables in schema part0 to part0;
grant all on all functions in schema part0 to part0;

-- part1 (identical to part0)
create schema authorization part1;
create table part1.users( check(id%2=1) ) inherits (public.users);
create or replace function part1.list_users(condition text)
returns table(id int,name text) language sql as $$
select id,name from part1.users where name like $1;
$$;
grant all on all tables in schema part1 to part1;
grant all on all functions in schema part1 to part1;

\i /home/filip/pg91/share/postgresql/contrib/plproxy.sql

--router
CREATE SERVER testplproxy FOREIGN DATA WRAPPER plproxy OPTIONS (
connection_lifetime '1800',
p0 'dbname=testdb host=127.0.0.1 port=5901 user=part0',
p1 'dbname=testdb host=127.0.0.1 port=5901 user=part1'
);
CREATE USER MAPPING FOR PUBLIC SERVER testplproxy;
GRANT USAGE ON FOREIGN SERVER testplproxy TO public;

-- router
create or replace function public.list_users(condition text)
returns table(id int,name text) language plproxy as $$
cluster 'testplproxy';
run on all;
$$;

select * from public.list_users('%xyz%'); -- crash with segfault

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert James 2011-12-18 00:04:18 Re: CREATE OR REPLACE AGGREGATE
Previous Message Josh Kupershmidt 2011-12-17 19:13:25 Re: LOCK DATABASE