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 1n0goj-0002tM-JB for pgsql-committers@arkaria.postgresql.org; Fri, 24 Dec 2021 09:24:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n0goh-0003my-D1 for pgsql-committers@arkaria.postgresql.org; Fri, 24 Dec 2021 09:24:47 +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 1n0goh-0003jC-5w for pgsql-committers@lists.postgresql.org; Fri, 24 Dec 2021 09:24:47 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n0goe-00031B-3n for pgsql-committers@lists.postgresql.org; Fri, 24 Dec 2021 09:24:46 +0000 Received: from [172.20.10.7] (sp49-98-212-42.msd.spmode.ne.jp [49.98.212.42]) by oss.nttdata.com (Postfix) with ESMTPSA id C1FC460620; Fri, 24 Dec 2021 18:24:40 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.4 at oss.nttdata.com Message-ID: Date: Fri, 24 Dec 2021 18:24:39 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc Content-Language: en-US To: Kyotaro Horiguchi Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org References: <863b94a8-1cf2-237f-fa5e-53625748d192@oss.nttdata.com> <20211224.180006.2247635208768233073.horikyota.ntt@gmail.com> From: Fujii Masao In-Reply-To: <20211224.180006.2247635208768233073.horikyota.ntt@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021/12/24 18:00, Kyotaro Horiguchi wrote: > I saw the test has been revertd. Yes, I reverted the added unstable tests not to prevent buildfarm from testing other patches while I'm doing the investigation. > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2021-12-24%2008%3A02%3A25 > >> NOTICE: identifier >> "pg_regress/postgres_fdwbuildfarmcontrib_regression_postgres_fdw757365%" >> will be truncated to >> "pg_regress/postgres_fdwbuildfarmcontrib_regression_postgres_fdw" > > It's 70 characters long.. > > application_name: pg_regress/postgres_fdw > user_name : buildfarm > database_name : contrib_regression_postgres_fdw > Source PID : 757365 > > Maybe we can distribute the placeholders into several sessions. Or probably we don't need to test all escape sequences. How about picking up one or two from them? But even if only one or two are picked up, application_name still can be larger than 63 characters. So probably we also should use substring() in the test query, for that case. For example, SELECT count(*) > 0 FROM pg_stat_activity WHERE application_name = substring(current_setting('application_name') || CURRENT_USER || current_database() || pg_backend_pid() || '%', 1, 63); Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION