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.94.2) (envelope-from ) id 1tsOcP-001Vik-CR for pgsql-committers@arkaria.postgresql.org; Wed, 12 Mar 2025 16:07:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tsOcO-0089Wj-1o for pgsql-committers@arkaria.postgresql.org; Wed, 12 Mar 2025 16:07:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsOcN-0089Wa-Qf for pgsql-committers@lists.postgresql.org; Wed, 12 Mar 2025 16:07:39 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tsOcK-002Tkj-0x for pgsql-committers@lists.postgresql.org; Wed, 12 Mar 2025 16:07:39 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5dca468c5e4so13283479a12.1 for ; Wed, 12 Mar 2025 09:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741795656; x=1742400456; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UtAOgugMPnZIIBtK6AuuqEOpGx8AoSAoJKuaHOaWkx0=; b=YmJ3AH4WUVnq7G3OycP1Jb2qhnR32Wljyqflm7P+9Zsi875BlQtnPPY7yERW+W9cjZ UNj1fyssIRrb5laIvlDhrMVbKB05Y4ynzU0hZiXn50BNeILKCsUkgdqbdwK9oshRTiUb hSyK8lpjAhmvuXPlQCYK4iWrcB8OZfd4sXy+oP+V+l+ZQf0IGKckYCF7/eLO4dwXWv1X 7JDx9LCkDmyrIUcavCEaHuDPc+eJGhMwaoJ2HRdaqNPhPDno69D7SC0FtztqD/zuUyQB vs4X4m4R5+K5M8BJl8vYxCdHzlft9WLfvIddcf3Lq1kZbUO8drLDDmmLu8Q8B5R3i6DU RXlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741795656; x=1742400456; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UtAOgugMPnZIIBtK6AuuqEOpGx8AoSAoJKuaHOaWkx0=; b=TtUxYt175Qr0wrmB1eevfUh69lGQFWHZs0r/AQFQ+l3WV740fqvy76RvG+9GIV8tDC 4XzZABozIpDXDmHYxgPmkg9+lPshjKsa2ezK6zaucUn0hFu1KLahQwIoFqJdEhmNvzjP ypMuULt9cUOuBXINc3Qbch06TJdxkDc7elP7ZE2X8FD1AruCRRzS82P1U03IoeNWbseJ ZEA0RPV8HcdYA2BmVo2Fyr/TwtlQl4bYR/4vQDRy9mSWJAToCg/AKjKZFkhUt54J196G 1/FN3Lk7b+jQl2RK6bODunHbb/rNDRauugzHcjoVOG8J6Cp/fZYVOKNibrO0GVCnKfTG b8Qg== X-Gm-Message-State: AOJu0YxHGcHmhNN6YtTLNp3TCYQVOmrjCLFCYETOHO1sax/yHg7oEJeY nWzYk9qJdo8WSbYX/QjGHb0zKI7/ysRVUHpFeIO1IiXhNW8XPW8449qwsF/7hYsRdRYWWsGOUeB AUoB8avZcUwCVlB0LeALmLoXA3CI= X-Gm-Gg: ASbGncsnJfK6GWnmBw7odNnYVBHPE348qfu9X20kCoLTzgOTHqwx0H4QjPnZxjXpnD5 IBIBEcJxSFjsBfr1wqZQ19bL2o0apHPK8xHWEdPnrPghjAkvhykYCzXhXbVpmjLN6/WaG+H2qSw SfkoKxoIOHtVs24bhriwvvWGLMirVfA1dzmwjaV5YsuI8OLPGZocDQpOwjym+6pPDv9yZsH1o= X-Google-Smtp-Source: AGHT+IEwNUqcLdeaKMvcxVGQh+fFbvAdg/RgG8d6LeSgZJ0wq0KPW7xeJtxboFpdCLhpNPE85Kha0TxJvyFgP5NnDCc= X-Received: by 2002:a05:6402:13cb:b0:5e5:3610:8b7a with SMTP id 4fb4d7f45d1cf-5e5e240ef6bmr31820189a12.17.1741795655995; Wed, 12 Mar 2025 09:07:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Melanie Plageman Date: Wed, 12 Mar 2025 12:07:24 -0400 X-Gm-Features: AQ5f1JoZXplo1UrlrSIe3rxQsq9EDPKAZefH3-TQz72QyNLY3FcNydKdUlbbw9w Message-ID: Subject: Re: pgsql: Modularize log_connections output To: "Daniel Westermann (DWE)" Cc: "pgsql-committers@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thanks for taking a look! On Wed, Mar 12, 2025 at 11:50=E2=80=AFAM Daniel Westermann (DWE) wrote: > > > great, thanks for this. One question: > > >The current log_connections options are 'receipt', 'authentication', and > >'authorization'. The empty string disables all connection logging. 'all' > >enables all available connection logging. > > ... shouldn't this be added to tab completion as well? > > postgres=3D# alter system set log_connections TO DEFAULT Because it is now a string GUC, there isn't a facility for tab completion. Enum and boolean GUCs have a defined set of options which can be provided as options for tab completion. Because string GUCs don't have to have a set of defined options, they don't have tab completion (AFAIK). For example, you couldn't have a defined set of options for log_line_prefix. There are a subset of the string GUCs that do have predefined options which they validate in their check hooks. Many of these are GUCs which can accept some combination of options -- so they don't fit well into the enum GUC type (for example, debug_io_direct). While writing this feature, I did consider if we should add a new GUC type PGC_SET [1] which would back GUCs that accept any subset of a predefined set of options. This would allow us to have tab completion. I didn't end up doing this because I felt tab completion was the only advantage it would provide this patch and it would be a big code change, but it is definitely something to consider in the future. - Melanie [1] https://www.postgresql.org/message-id/CAAKRu_a5-7sUP%2BQ6YD5emQYS1w7ffB= DUNf-NMbcxR-dpOdGehw%40mail.gmail.com