pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15747: Help says 'application_name' property supports 64 characters in a standard built but it's only 63
3+ messages / 3 participants
[nested] [flat]
* BUG #15747: Help says 'application_name' property supports 64 characters in a standard built but it's only 63
@ 2019-04-11 08:53 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2019-04-11 08:53 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: tobias.gierke@code-sourcery.de
The following bug has been logged on the website:
Bug reference: 15747
Logged by: Tobias Gierke
Email address: tobias.gierke@code-sourcery.de
PostgreSQL version: 11.2
Operating system: CentOS 7 (PG 11.2 compiled from sources)
Description:
According to
https://www.postgresql.org/docs/current/runtime-config-logging.html
'application_name' can be up 64 characters long:
"The application_name can be any string of less than NAMEDATALEN characters
(64 characters in a standard build)."
We tried to set a longer application name - PostgreSQL actually truncates
the name to 63 characters (probably because of the terminating 0-byte taking
up the 64th slot).
db=# set
application_name='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
will be truncated to
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
SET
db=# select
length('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
length
--------
63
(1 row)
db=# select '>' || application_name || '<' from pg_stat_activity where
application_name like 'xxx%';
?column?
-------------------------------------------------------------------
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<
(1 row)
db=# select
length('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
length
--------
63
(1 row)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #15747: Help says 'application_name' property supports 64 characters in a standard built but it's only 63
@ 2019-04-11 08:58 Sergei Kornilov <sk@zsrv.org>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Kornilov @ 2019-04-11 08:58 UTC (permalink / raw)
To: tobias.gierke@code-sourcery.de <tobias.gierke@code-sourcery.de>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Hi
> According to
> https://www.postgresql.org/docs/current/runtime-config-logging.html
> 'application_name' can be up 64 characters long:
>
> "The application_name can be any string of less than NAMEDATALEN characters
> (64 characters in a standard build)."
Less than 64. Not "less or equals"
Doc is correct, application_name should be less than NAMEDATALEN, so maximun possible value is NAMEDATALEN - 1 characters (well, bytes)
regards, Sergei
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #15747: Help says 'application_name' property supports 64 characters in a standard built but it's only 63
@ 2019-04-11 09:05 Tobias Gierke <tobias.gierke@code-sourcery.de>
parent: Sergei Kornilov <sk@zsrv.org>
0 siblings, 0 replies; 3+ messages in thread
From: Tobias Gierke @ 2019-04-11 09:05 UTC (permalink / raw)
To: Sergei Kornilov <sk@zsrv.org>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Hi Sergei,
Of course you're right. Sorry for the noise.
Cheers,
Tobias
> Hi
>
>> According to
>> https://www.postgresql.org/docs/current/runtime-config-logging.html
>> 'application_name' can be up 64 characters long:
>>
>> "The application_name can be any string of less than NAMEDATALEN characters
>> (64 characters in a standard build)."
> Less than 64. Not "less or equals"
> Doc is correct, application_name should be less than NAMEDATALEN, so maximun possible value is NAMEDATALEN - 1 characters (well, bytes)
>
> regards, Sergei
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2019-04-11 09:05 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11 08:53 BUG #15747: Help says 'application_name' property supports 64 characters in a standard built but it's only 63 PG Bug reporting form <noreply@postgresql.org>
2019-04-11 08:58 ` Sergei Kornilov <sk@zsrv.org>
2019-04-11 09:05 ` Tobias Gierke <tobias.gierke@code-sourcery.de>
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