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 1rdysi-008hSH-SU for pgsql-hackers@arkaria.postgresql.org; Sat, 24 Feb 2024 20:44:25 +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 1rdysg-005pOK-G3 for pgsql-hackers@arkaria.postgresql.org; Sat, 24 Feb 2024 20:44:22 +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.94.2) (envelope-from ) id 1rdysg-005pOB-6d for pgsql-hackers@lists.postgresql.org; Sat, 24 Feb 2024 20:44:22 +0000 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rdysY-000oeQ-Ai for pgsql-hackers@postgresql.org; Sat, 24 Feb 2024 20:44:21 +0000 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3c049ccb623so1746728b6e.1 for ; Sat, 24 Feb 2024 12:44:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708807454; x=1709412254; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8AQjViUm40l+W+StiDJ2hzcuMIuqkTKzaBAlD1wmcbM=; b=TRkuDmCgNHSjKT6hJaCwPbmbD0aNcUfSaKioz9sCUdcTQfjC4KEtQwiTD2iiFyGRX+ HN+jkEXxgjpsEpPG8Bqn2vd+J7Omz3pQu4N0LNvcX0T/eNVnKhFVywkf/MMeK5Tzk5FH Z8oEuodbW+37JBuRK4GZQGYcabD8CdMkBNH/QD2bQlVQw3rHtmuyGVfNfoHHhKE3aByt C++B+tv83qv+EtlIFf1l6+UfqC9LmmRsvXNpTR0BMcmE+5fSS/LduXOkblk3nLPakP5G WrR7CfZWYsMTy43Qxbs8gg9lKRP+6K8aJtI8jKlFBHjr86TOl7AYADatcI3m/p5HXh0D wKBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708807454; x=1709412254; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8AQjViUm40l+W+StiDJ2hzcuMIuqkTKzaBAlD1wmcbM=; b=W+KQAwUWTuF6gXa5fSWxN+ttOlQENme7F1wz6pD3npyEBecEjMwPZBAlCCCzIrM2Gh JWkFVRMRJiz435Yi8km+wlNqqVrxvXgFmAIg6HzwPUiF3F2TT7gHuj+vB33IkEGa3n2R Tworh9WL5jva9LxUnz6oVRROQ12ZXKglKvxTuGO1gXWs0gFYwzZ2yXHZixWrNAjDPfi1 jIRKp3PhdHw9N2MyAYdkXHR6mF8bWd1AKBo8jB0yyauLaEIFh68N49Bc+jp9hxT0THzW 8WnkQ03pQhLFHeKfABPEtDWyxUkaj3FbG4nVN4UYWH0qsgyueakpSwQHmOmWergGqV0I CIMA== X-Forwarded-Encrypted: i=1; AJvYcCW68ocEQlr/tExxDPcolwKdA5UurgSGv+Ed4iCT3eistDGaks7Ezbh+y5JbKdurBHoGaqWkFcovwnbyGWtI2rioH3EvvAkMIjwFsILG X-Gm-Message-State: AOJu0Yy9aGJ1AY/t3nknEM4UJKagTNEZph7ausqTi0kJ2kmBbRJg6JhQ NImFwyY4kpizbrMM265FDASGClmLjDLHEW+ebbfy2L88W+UwDNt2Q/Pz0Nkn X-Google-Smtp-Source: AGHT+IGDKEAPPGzrl6mrfM5cM5ct0a47b4+UhAZ2I9XLis/PBOSDkN7bWyZSVLSubEbue5nuM0Vv4Q== X-Received: by 2002:a05:6870:468f:b0:21e:631d:9473 with SMTP id a15-20020a056870468f00b0021e631d9473mr2677618oap.10.1708807454329; Sat, 24 Feb 2024 12:44:14 -0800 (PST) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id fx16-20020a0566381e1000b004745d3d9f86sm405439jab.30.2024.02.24.12.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 12:44:13 -0800 (PST) Date: Sat, 24 Feb 2024 14:44:12 -0600 From: Nathan Bossart To: Maiquel Grassi Cc: Jim Jones , Pavel Luzanov , Erik Wienhold , "pgsql-hackers@postgresql.org" Subject: Re: Psql meta-command conninfo+ Message-ID: <20240224204412.GA1866465@nathanxps13> References: <49edac91-d47f-4cac-ae12-d51cabbd87c9@postgrespro.ru> <49635a5b-3d32-4f05-8ce4-c55c70181888@uni-muenster.de> <8a93f6c0-795f-4260-a5fd-07ccbddbc88f@uni-muenster.de> <20240216155449.GA1236054@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Feb 17, 2024 at 02:53:43PM +0000, Maiquel Grassi wrote: > The "pg_stat_ssl" view is available from >= PG 9.5, and the "pg_stat_gssapi" view is > available from >= PG 12. The "compression" column was removed from the > "pg_stat_ssl" from >= PG 14. All of these cases introduce greater complexity in > maintaining the SQL. The central idea from the beginning has always been to show > the user all the information from \conninfo and extend it in \conninfo+. IMHO we should use the views whenever possible (for the reason stated above [0]). I think it's okay if we need to fall back to a different approach for older versions. But presumably we'll discontinue psql support for these old server versions at some point, at which point we can simply delete the dead code that doesn't use the views. > The absence > of the "compression" column in version 14 and above makes dealing with this even > more complicated, and not showing it seems to contradict \conninfo. I would be okay with using PQsslAttribute() for all versions for this one since any remaining support for this feature is on its way out. Once psql no longer supports any versions that allow SSL compression, we could probably remove it from \conninfo[+] completely or hard-code it to "off". > SSL support has been available since version 7.1 (see documentation); if there was > > support before that, I can't say. In this regard, it may seem strange, but there are still > many legacy systems running older versions of PostgreSQL. Just yesterday, I assisted > a client who is still using PG 8.2. In these cases, using the "pg_stat_ssl" and > "pg_stat_gssapi" views would not be possible because they don't exist on the server. > I believe that psql should cover as many cases as possible when it comes to compatibility > with older versions (even those no longer supported). In this case, concerning SSL and > GSS, I think libpq is better prepared to handle this. At the moment, the psql support cutoff appears to be v9.2 (see commit cf0cab8), which has been out of support for over 6 years. If \conninfo+ happens to work for older versions, then great, but I don't think we should expend too much energy in this area. [0] https://postgr.es/m/20240216155449.GA1236054%40nathanxps13 -- Nathan Bossart Amazon Web Services: https://aws.amazon.com