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 1n0h7Y-0003n5-Ah for pgsql-committers@arkaria.postgresql.org; Fri, 24 Dec 2021 09:44:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n0h7W-0000VP-Aw for pgsql-committers@arkaria.postgresql.org; Fri, 24 Dec 2021 09:44:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n0h7W-0000VG-1V for pgsql-committers@lists.postgresql.org; Fri, 24 Dec 2021 09:44:14 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n0h7S-0006Em-Vn for pgsql-committers@lists.postgresql.org; Fri, 24 Dec 2021 09:44:13 +0000 Received: by mail-pl1-x635.google.com with SMTP id i6so304974pla.0 for ; Fri, 24 Dec 2021 01:44:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=qE1dcZ+UBbwEylgUw7q9IJuHT0kFLQxV6rzkH0UxUXk=; b=eY+o3aMOGcod74F9UMEU58MpN13mCjb4I1uRHZU9+d0wHbBp4OuYyYAHpJ/U/cCZG5 HO1HSubNt7CoYbyf9DfrcF2rdcGsyJpBQpS8VkZ/u+yPvwdNUrrD2wuw8UbRIQ4P0XUF SQEr2qxBvNHP38W3bJBExPF1+D1c8+TO+3PLF1db1RUANlL5W+xUQWLdqLsMZHE4LWIW +RBc1DmWaAD6TJUQOzlTSGRpZTgC6YMZDJius5taMyisAukXa7BGA2SxRl+ZqGTbNjr8 RF5+WZJKbOx26ClqkOc02HoaFnOuUApNsh2ZE5IIaSReh70kfnPQdNLXZApVW199ihzZ XaIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=qE1dcZ+UBbwEylgUw7q9IJuHT0kFLQxV6rzkH0UxUXk=; b=swfY4v72fxm49aznCw/mOsqak9kufkYQKucDWF8FuhJH1eXwWvzRMZQBUPo3cvjl24 zRUdp+LRqixTsH4NnFO/wuBq6XrAky63XNI8IE2hGePG/Kghd90bd7YdJ/ywbm6HRgzx rzqKl7emBIkZ2iGfgzkzv2ccuVIMiLhVjK0G5en6irk9TliCBxEm6EAiEwjQ2YDfHlef JFc3e6vRzMNqdRYkVQwDGeed6MFYXd3bVc7dGVzjlDNoa+FrcWO7P7DbJzg0ssvggqNd A6ypNbj5bdcCtM61UTKCXPe059QwQhL2WvW/ieIEWe2h4Lzi9HO9fngDZs/FPOQg3dYk z1BQ== X-Gm-Message-State: AOAM531Dkjw2XI0ozOSunDDuP6i3+tTyJ9UH6TH0KB9jOV2iGqMaai5O N/tTi8l9CE21+1IzW7vyVGA= X-Google-Smtp-Source: ABdhPJwM8gp5G5u5EtU7gfuJZ6cUAQ89PVgIa1FgFDO298HkKszGZFgRjAe8OBIiLawLRy4pSfkl2Q== X-Received: by 2002:a17:902:b712:b0:148:a2e7:fb4f with SMTP id d18-20020a170902b71200b00148a2e7fb4fmr5920071pls.144.1640339048701; Fri, 24 Dec 2021 01:44:08 -0800 (PST) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id h19sm5786120pfh.112.2021.12.24.01.44.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 24 Dec 2021 01:44:08 -0800 (PST) Date: Fri, 24 Dec 2021 18:44:06 +0900 (JST) Message-Id: <20211224.184406.814784272581964942.horikyota.ntt@gmail.com> To: masao.fujii@oss.nttdata.com Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org Subject: Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc From: Kyotaro Horiguchi In-Reply-To: References: <863b94a8-1cf2-237f-fa5e-53625748d192@oss.nttdata.com> <20211224.180006.2247635208768233073.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk At Fri, 24 Dec 2021 18:24:39 +0900, Fujii Masao wrote in > > > 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); I once thought the same, but that change causes buildfarms *always* truncate the resulting application name. I believe the base application_name and database_name never grows further longer. So I'd like to split the check to %a%u%% and %d%p. regards. -- Kyotaro Horiguchi NTT Open Source Software Center