public inbox for [email protected]  
help / color / mirror / Atom feed
BUG #19540: Inconsistent integer-to-octal formatting for permission GUCs in pg_settings (boot_val vs setting)
2+ messages / 2 participants
[nested] [flat]

* BUG #19540: Inconsistent integer-to-octal formatting for permission GUCs in pg_settings (boot_val vs setting)
@ 2026-06-30 06:45 PG Bug reporting form <[email protected]>
  2026-06-30 15:58 ` Re: BUG #19540: Inconsistent integer-to-octal formatting for permission GUCs in pg_settings (boot_val vs setting) Tom Lane <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2026-06-30 06:45 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

The following bug has been logged on the website:

Bug reference:      19540
Logged by:          Jobin Augustine
Email address:      [email protected]
PostgreSQL version: 18.4
Operating system:   All
Description:        

This is more of an undocumented behavior in all PostgreSQL versions.

Steps to reproduce:
postgres=# SELECT name, setting, boot_val
FROM pg_settings
WHERE name IN ('data_directory_mode', 'log_file_mode',
'unix_socket_permissions');

Actual Result :
          name           | setting | boot_val
-------------------------+---------+----------
 data_directory_mode     | 0700    | 448
 log_file_mode           | 0600    | 384
 unix_socket_permissions | 0777    | 511
(3 rows)

File/Directory permissions like 448,384 and 511 may not make a good sense
for a user. Either a decoded value or mentioning it in docs would be great.
Displaying the value consistent with "setting" column is most desirable from
a user perspective.

Thank you,
Jobin.








^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #19540: Inconsistent integer-to-octal formatting for permission GUCs in pg_settings (boot_val vs setting)
  2026-06-30 06:45 BUG #19540: Inconsistent integer-to-octal formatting for permission GUCs in pg_settings (boot_val vs setting) PG Bug reporting form <[email protected]>
@ 2026-06-30 15:58 ` Tom Lane <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2026-06-30 15:58 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

PG Bug reporting form <[email protected]> writes:
> Steps to reproduce:
> postgres=# SELECT name, setting, boot_val
> FROM pg_settings
> WHERE name IN ('data_directory_mode', 'log_file_mode',
> 'unix_socket_permissions');

> Actual Result :
>           name           | setting | boot_val
> -------------------------+---------+----------
>  data_directory_mode     | 0700    | 448
>  log_file_mode           | 0600    | 384
>  unix_socket_permissions | 0777    | 511
> (3 rows)

Yeah, the min and max columns are confusing too.  That's because
we entrust the formatting to the "show_hook" for those variables,
and those hooks are defined to show the current value only.

Looking through the existing show_hooks, all the other ones seem to
be used to account for situations where the effective value depends on
more than just the GUC variable itself.  Maybe we should say that
a show_hook should be used only for that purpose and not for specially
formatting the value?  We could deal with these cases by inventing a
new GUC flag, say GUC_SHOW_IN_OCTAL, that could be applied to all the
relevant values.

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-06-30 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-06-30 06:45 BUG #19540: Inconsistent integer-to-octal formatting for permission GUCs in pg_settings (boot_val vs setting) PG Bug reporting form <[email protected]>
2026-06-30 15:58 ` Tom Lane <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox