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 1n0hEz-00049u-N5 for pgsql-committers@arkaria.postgresql.org; Fri, 24 Dec 2021 09:51:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n0hEy-0002tk-8W for pgsql-committers@arkaria.postgresql.org; Fri, 24 Dec 2021 09:51:56 +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 1n0hEx-0002tb-VG for pgsql-committers@lists.postgresql.org; Fri, 24 Dec 2021 09:51:56 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n0hEv-0003Dc-8s for pgsql-committers@lists.postgresql.org; Fri, 24 Dec 2021 09:51:54 +0000 Received: by mail-pj1-x1029.google.com with SMTP id x1-20020a17090a2b0100b001b103e48cfaso7840480pjc.0 for ; Fri, 24 Dec 2021 01:51:53 -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=Zp1/wFX223ZsWyUA2jqaQkw3iIPA9Nxx7KEqfxuxf5Q=; b=Z14m1+mFEjJLQutKASg6oycwcHdL0ha1WwO4RuTlXt+8YBy4sOus+VejJCHwMNIgND RcMp/8fIzYBJYRF4AO1+K3BqjU7deeWnlqUGzFHJa751MHPEZc4TEb8mc9F7PBvMV+eU DER3MLmbsyIfYYAyzvmGAHljTGnF2V5AEHSelvWAQMsFBqndkz2GL8OqSLRWQ3DPaq0a ZapbUIPCRBGkPWqppKDj/cAI7rWPixtsN21SFMM1fCGJvWNOtA+wGqNXyC0RVvq+sz9M hnSUSBhmqcO5t27mSsoH3cNgAx7vO3Wqqn29K/z51Db/Yz+CHlwUNRqgXBPrV9xP8A6c Hqeg== 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=Zp1/wFX223ZsWyUA2jqaQkw3iIPA9Nxx7KEqfxuxf5Q=; b=fsFfB0T2ViEjFAFgqDa3Q5MYnHpFiy3Ht0j36xESpuKLU1veVzGptk+x0IzHTOTpLN I868dg/BB0HCVtVYGmizHlczAddWRAkImYgyWjXy+os/RxwY8Th+yxmUJ2hFBLwQpzzs rncB94wBdc04Em0eb3qvJojz9qxzAHn8kgioV4mgD0/oq6B56FirBFAdxrXQbAoUyjWZ tgAp+Pba/Ex4SNL+kjmnYkJJT+p328bw7yLcEMaeTHJa/eNnek5XKLQVEzvtp1B3zrRs ZD2WGc/rvl8IicryM64bpRN71YxlVcS6oEL4zuShKGcOq6JQMPX/FghHDfou6N54QmSL peDw== X-Gm-Message-State: AOAM533jj/0dVvF6ngvcCyNeiln1a/jQ9IAdthHyM803hgX6PdPUlyEU 3yPOx++abuEGOQ5kZkQjq/g= X-Google-Smtp-Source: ABdhPJxsKeCv62mjtC0yuOP8ZnqADCotWTtzLJAG1s8MeVqWQGOUy2KcqS0aHjLCf1IP4mp+syZXqQ== X-Received: by 2002:a17:90b:f82:: with SMTP id ft2mr7045967pjb.203.1640339512098; Fri, 24 Dec 2021 01:51:52 -0800 (PST) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id p66sm8394043pfb.142.2021.12.24.01.51.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 24 Dec 2021 01:51:51 -0800 (PST) Date: Fri, 24 Dec 2021 18:51:49 +0900 (JST) Message-Id: <20211224.185149.309125674754654282.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: <20211224.184406.814784272581964942.horikyota.ntt@gmail.com> References: <20211224.180006.2247635208768233073.horikyota.ntt@gmail.com> <20211224.184406.814784272581964942.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:44:06 +0900 (JST), Kyotaro Horiguchi wrote in > 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. Or if we are convinced that the names won't get longer, we could set application_name on the local session as something like 'X' so that the result fits 63 character-long.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center