Re: WARNING in parallel index creation.

2018-04-12 Thread Robert Haas
On Wed, Apr 11, 2018 at 2:34 PM, Tom Lane wrote: > That test is, therefore, wrong. Otherwise, no non-builtin function > could ever be marked parallel safe, for fear that the shlib it lives > in might try to set up a custom variable at load time. I don't follow that logic. If the check is more s

Re: WARNING in parallel index creation.

2018-04-11 Thread Tom Lane
I wrote: > The WARNING seems to indicate that the error check in set_config_option > is too aggressive. I kind of wonder why it was placed there at all, > rather than in SQL-level operations like ExecSetVariableStmt. BTW, looking back at the thread, nobody seems to have posted an analysis of why

Re: WARNING in parallel index creation.

2018-04-11 Thread Tom Lane
Andres Freund writes: > On 2018-03-12 20:44:01 -0700, Peter Geoghegan wrote: >> I wonder why DefineCustomStringVariable() does not set var->reset_val. >> We see that within DefineCustomEnumVariable(), >> DefineCustomRealVariable(), DefineCustomIntVariable(), etc. > Peter, have you investigated th

Re: WARNING in parallel index creation.

2018-04-11 Thread Andres Freund
On 2018-03-12 20:44:01 -0700, Peter Geoghegan wrote: > On Sun, Mar 11, 2018 at 10:15 PM, Jeff Janes wrote: > > Then when I create in index, I get a warning: > > > > jjanes=# create index on pgbench_accounts (foobar(filler)); > > WARNING: cannot set parameters during a parallel operation > > WARNI

Re: WARNING in parallel index creation.

2018-03-12 Thread Peter Geoghegan
On Sun, Mar 11, 2018 at 10:15 PM, Jeff Janes wrote: > Then when I create in index, I get a warning: > > jjanes=# create index on pgbench_accounts (foobar(filler)); > WARNING: cannot set parameters during a parallel operation > WARNING: cannot set parameters during a parallel operation > > If I c

WARNING in parallel index creation.

2018-03-11 Thread Jeff Janes
If i run: pgbench -i -s30 And then create the function: CREATE OR REPLACE FUNCTION foobar(text) RETURNS text LANGUAGE plperl IMMUTABLE PARALLEL SAFE STRICT COST 1 AS $function$ return scalar reverse($_[0]); $function$; Then when I create in index, I get a warning: jjanes=# create inde