Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lSKPz-0007hl-RU for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Apr 2021 14:04:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lSKPy-0003l5-P3 for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Apr 2021 14:04:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lSKPy-0003ky-Ie for pgsql-hackers@lists.postgresql.org; Fri, 02 Apr 2021 14:04:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lSKPw-0005Mu-6c for pgsql-hackers@lists.postgresql.org; Fri, 02 Apr 2021 14:04:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 132E4oJE3650141; Fri, 2 Apr 2021 10:04:50 -0400 From: Tom Lane To: Alvaro Herrera cc: Kyotaro Horiguchi , iwata.aya@fujitsu.com, tsunakawa.takay@fujitsu.com, k.jamison@fujitsu.com, pgsql-hackers@lists.postgresql.org Subject: Re: libpq debug log In-reply-to: <20210402135218.GA13909@alvherre.pgsql> References: <20210402135218.GA13909@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 02 Apr 2021 10:52:18 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3650139.1617372290.1@sss.pgh.pa.us> Date: Fri, 02 Apr 2021 10:04:50 -0400 Message-ID: <3650140.1617372290@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > As in the attached patch. +1, but the comment could be more specific. Maybe like "In regress mode, suppress the length of ErrorResponse and NoticeResponse messages --- the F (file name) field, in particular, can vary in length depending on compiler used." Actually though ... I recall now that elog.c tries to standardize the F output by stripping the path part: /* keep only base name, useful especially for vpath builds */ slash = strrchr(filename, '/'); if (slash) filename = slash + 1; I bet what is happening on drongo is that the compiler has generated a __FILE__ value that contains backslashes not slashes, and this code doesn't know how to shorten those. So maybe instead of lobotomizing this test, we should fix that. slash = strrchr(filename, '/'); + if (!slash) + slash = strrchr(filename, '\\'); if (slash) filename = slash + 1; regards, tom lane