From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: masao.fujii@oss.nttdata.com
Cc: fujii@postgresql.org
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc
Date: Fri, 24 Dec 2021 18:51:49 +0900 (JST)
Message-ID: <20211224.185149.309125674754654282.horikyota.ntt@gmail.com> (raw)
In-Reply-To: <20211224.184406.814784272581964942.horikyota.ntt@gmail.com>
References: <20211224.180006.2247635208768233073.horikyota.ntt@gmail.com>
<dc411fde-fa8a-a732-81b2-38cfe79136f3@oss.nttdata.com>
<20211224.184406.814784272581964942.horikyota.ntt@gmail.com>
At Fri, 24 Dec 2021 18:44:06 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in
> At Fri, 24 Dec 2021 18:24:39 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: horikyota.ntt@gmail.com, masao.fujii@oss.nttdata.com, fujii@postgresql.org
Subject: Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc
In-Reply-To: <20211224.185149.309125674754654282.horikyota.ntt@gmail.com>
References: <20211224.180006.2247635208768233073.horikyota.ntt@gmail.com> <dc411fde-fa8a-a732-81b2-38cfe79136f3@oss.nttdata.com> <20211224.184406.814784272581964942.horikyota.ntt@gmail.com> <20211224.185149.309125674754654282.horikyota.ntt@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox