Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1weaqj-004tEJ-2H for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Jun 2026 15:58:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1weaqi-0091S2-1D for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Jun 2026 15:58:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1weaqi-0091Ru-0O for pgsql-bugs@lists.postgresql.org; Tue, 30 Jun 2026 15:58:12 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1weaqf-00000000wIF-2YHr for pgsql-bugs@lists.postgresql.org; Tue, 30 Jun 2026 15:58:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 65UFw87U2665564; Tue, 30 Jun 2026 11:58:08 -0400 From: Tom Lane To: jobinau@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19540: Inconsistent integer-to-octal formatting for permission GUCs in pg_settings (boot_val vs setting) In-reply-to: <19540-e641040b089ab768@postgresql.org> References: <19540-e641040b089ab768@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 30 Jun 2026 06:45:35 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2665562.1782835088.1@sss.pgh.pa.us> Date: Tue, 30 Jun 2026 11:58:08 -0400 Message-ID: <2665563.1782835088@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form 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