Re: BUG #9464: PANIC with 'failed to re-find shared lock object'

From: Peter LaDow <petela(at)gocougs(dot)wsu(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9464: PANIC with 'failed to re-find shared lock object'
Date: 2014-03-07 01:10:07
Message-ID: CAN8Q1EcttCT+sk-+gBERGb8BALh2MVkbVH=WW0PSbzvO1EeVzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Mar 6, 2014 at 4:56 PM, <petela(at)gocougs(dot)wsu(dot)edu> wrote:
> -- Add the schema to the search path. Note that selecting from a table,
> -- even if the result is unused, exhibits the problem. It seems to be
> -- a select coupled with a set_config() that causes problems (of course
> -- paired with our C extension).
> CREATE OR REPLACE FUNCTION public.set_schema( )
> RETURNS VOID AS $$
> DECLARE
> bar TEXT;
> BEGIN
> SELECT schema_name INTO bar FROM public.dummy_schema;
> PERFORM pg_catalog.set_config('search_path', 'schema_16,public',
> false);
> END;
> $$ LANGUAGE plpgsql VOLATILE STRICT SECURITY DEFINER;

A bit more clarification. After sending this, we tweaked the
set_schema() function a bit and determined the set_config() is
irrelelvant. Just a simple select is enough to cause the problem,
i.e.:

CREATE OR REPLACE FUNCTION public.set_schema( )
RETURNS VOID AS $$
DECLARE
bar TEXT;
BEGIN
SELECT schema_name INTO bar FROM public.dummy_schema;
END;
$$ LANGUAGE plpgsql VOLATILE STRICT SECURITY DEFINER;

Follow this up with:

psql -c "select set_schema(); select schema_16.myfoo(true);"

And we get the panic.

Thanks,
Pete

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message YAMAMOTO Takashi 2014-03-07 02:43:21 bug in ReplicationSlotsCountDBSlots
Previous Message petela 2014-03-07 00:56:23 BUG #9464: PANIC with 'failed to re-find shared lock object'