Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEVYo-0001UY-1D for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Apr 2019 08:59:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hEVYm-0001dQ-M4 for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Apr 2019 08:59:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEVYm-0001dJ-2U for pgsql-bugs@lists.postgresql.org; Thu, 11 Apr 2019 08:59:52 +0000 Received: from mx0a-00296801.pphosted.com ([148.163.150.38]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEVYi-0004Jh-W9 for pgsql-bugs@lists.postgresql.org; Thu, 11 Apr 2019 08:59:50 +0000 Received: from pps.filterd (m0114583.ppops.net [127.0.0.1]) by mx0a-00296801.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3B8pCZk029860 for ; Thu, 11 Apr 2019 08:59:47 GMT Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by mx0a-00296801.pphosted.com with ESMTP id 2rpjvn4pyp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 11 Apr 2019 08:59:46 +0000 Received: by mail-lj1-f200.google.com with SMTP id v20so1156904ljk.7 for ; Thu, 11 Apr 2019 01:59:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OMU7i6kTKPIgjQRgV8RRyKT3c0g40opcgsoKSWlcVG8=; b=bdTGm7JeyOD3N0ETrJPLG6aMDYW30nIMHZQoxPg5YEOozEDG6U70w+u/4SLC9AvnCK ddMgkcfARuUbCodBVa2iyTgRh8TDkzJW+vBTaScTdt4Mko3kMKZwNe7cWQ7yY+2HV95P AcytK/dLp22traoZiYh7SY8gVlDYzNwtisADOpdBG7cjPC9Xz4916R1E3bM7rzg0weea 2x6+xlBkdlUZ8umd5eDAntTBtcZXBfKh0Oxc3ftN1iKM+hG3S9/r7IsxvPfIm4wqXMbD dnrg+dr+OK8ZZtrF1ZyCx/mx3vHj/fivTw1FwiKvJLMhunJIDNTwnEHE3bm393Dwqvj4 Fr9g== X-Gm-Message-State: APjAAAWNT6hIiYDVUjjpxZYVaBGtNfziPkvhVWIZhpODIs6p7klfrl5j ykyLGyl6oPudTNHZrjLXOd9zdZG4fNZOPGrdHi9npaNrwgyay+YA7HjTtSDCDXXrlu8G4lCM8fm k98DAlW1uyL7Rfl2n/ve7KEIkEvHE93zrmVBugfmAF6OjFXpn0iiHNg== X-Received: by 2002:a2e:390c:: with SMTP id g12mr25757197lja.174.1554973184351; Thu, 11 Apr 2019 01:59:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWgaI0hBIj+pD6tjfNJqlG5v2aRauiCVDIXY1sw9fo2Mr8B7Ptkxk1FT1iRzDfbI0SfAs0Xg== X-Received: by 2002:a2e:390c:: with SMTP id g12mr25757182lja.174.1554973184125; Thu, 11 Apr 2019 01:59:44 -0700 (PDT) Received: from [192.168.1.72] (c-1026e455.027-294-73746f71.bbcust.telenor.se. [85.228.38.16]) by smtp.gmail.com with ESMTPSA id g79sm7685254lje.25.2019.04.11.01.59.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 01:59:43 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: BUG #15726: parallel queries failed ERROR: invalid name syntax CONTEXT: parallel worker From: Daniel Gustafsson In-Reply-To: Date: Thu, 11 Apr 2019 10:59:41 +0200 Cc: Tom Lane , ANASTACIO Tiago , Peter Geoghegan , PostgreSQL mailing lists Content-Transfer-Encoding: quoted-printable Message-Id: References: <15726-6d67e4fa14f027b3@postgresql.org> <1831482307.24522245.1554199154256@mail.yahoo.com> <29888.1554218381@sss.pgh.pa.us> To: Thomas Munro X-Mailer: Apple Mail (2.3445.9.1) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-11_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904110063 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On 2 Apr 2019, at 21:54, Thomas Munro wrote: >=20 > On Wed, Apr 3, 2019 at 4:19 AM Tom Lane wrote: >> Thomas Munro writes: >>> On Tue, Apr 2, 2019 at 10:59 PM ANASTACIO Tiago >>> wrote: >>>> A pity background worker are no more verbose (DEBUG5) than: >>>> 2019-04-02 09:42:38.993 GMT [17654] ERROR: invalid name syntax >>=20 >>> I agree, it would be nice to improve that. It seems to be a general >>> problem with any GUC that requires a transaction to check: parallel >>> workers will force that, but you might not understand the error >>> because it comes with no context. That gives me an idea: perhaps we >>> should set the elog() context while restoring GUCs, so that it is >>> displayed in the error output somehow. >>=20 >> Yeah, something like >>=20 >> CONTEXT: while setting parameter guc_variable_name to "some value" >>=20 >> would likely make this a whole lot more comprehensible. And I think >> it could probably be done in a fairly centralized way using an error >> callback. >=20 > Would you want to do it for GUC setting in general (for example using > the SET command), or just in this GUC-restore-for-parallel-query case? > Here's a 10 minute attempt at the latter. I think only doing it for the latter makes sense, when invoking the SET = command it=E2=80=99s more reasonable to associate the ERROR with the performed = action. > postgres=3D# set force_parallel_mode =3D 'on'; > SET > postgres=3D# select 42; > 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=E2=80=99m thinking we should add =E2=80=9Cduring worker = setup=E2=80=9D or something similar to make it even clearer, albeit more verbose. > It gets a bit repetitive in some other cases where it was already > reporting the name and value, though: > postgres=3D# select 42; > psql: ERROR: invalid value for parameter = "default_text_search_config": "foo" > CONTEXT: while setting parameter "default_text_search_config" to = "foo" > parallel worker It is indeed repetetive, but I=E2=80=99m not sure it=E2=80=99s worth = addressing that. Consistency in error messaging seems more important in this case. cheers ./daniel=