Re: BUG #15726: parallel queries failed ERROR: invalid name syntax CONTEXT: parallel worker

Daniel Gustafsson <dgustafsson@pivotal.io>

From: Daniel Gustafsson <dgustafsson@pivotal.io>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, ANASTACIO Tiago <tiago_anastacio@yahoo.fr>, Peter Geoghegan <pg@bowt.ie>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-04-11T11:39:06Z
Lists: pgsql-bugs
> On 11 Apr 2019, at 12:51, Thomas Munro <thomas.munro@gmail.com> wrote:
> 
> On Thu, Apr 11, 2019 at 8:59 PM Daniel Gustafsson
> <dgustafsson@pivotal.io> wrote:
>>> On 2 Apr 2019, at 21:54, Thomas Munro <thomas.munro@gmail.com> wrote:
>>> psql: ERROR:  invalid name syntax
>>> CONTEXT:  while setting parameter "default_text_search_config" to ""
>>> parallel worker
>> 
>> This makes it a lot better, but I wonder if it needs even more clarification to
>> be easily understandable by users not familiar with how parallel workers are
>> initiated.  I’m thinking we should add “during worker setup” or something
>> similar to make it even clearer, albeit more verbose.
> 
> Thanks for the review.  How about this?
> 
> postgres=# set force_parallel_mode = on;
> SET
> postgres=# select 42;
> psql: ERROR:  invalid name syntax
> CONTEXT:  while setting parameter "default_text_search_config" to ""
> in a parallel worker process
> parallel worker

Looks good, I think the extra verbosity is worth it to help users.

> I think this is a bug and should be back-patched.  Objections?

No objections.

cheers ./daniel


Commits

  1. When restoring GUCs in parallel workers, show an error context.

  2. Defer restoration of libraries in parallel workers.