Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVNAC-0001Ej-BO for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Oct 2020 23:05:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kVNAB-0001Wd-3N for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Oct 2020 23:04:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVNAA-0001WU-IJ for pgsql-hackers@lists.postgresql.org; Wed, 21 Oct 2020 23:04:58 +0000 Received: from anastigmatix.net ([68.171.219.55]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVNA4-0004Po-79 for pgsql-hackers@lists.postgresql.org; Wed, 21 Oct 2020 23:04:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wenZlHgZefjWXNDDtngWbvy+mMC0W6PG5N62SjvMW3c=; b=rySC0f0aHiXUufpkcAg6Kme4Uc uNZxu4vwPJCgCXhaX5q45pvoUzkoV1xffgsMeZ+EBv2tptdpYTFMYtm/SM+iE0GOmrMjpSoS0vSYk J/UGl+xzlaP83pp10I53Zsym2uRFFamUQ9mX00417AbT7ObuA43nnq1GzXQfu8dg/dUNkqOK0kvsD zkaIxn13MqwP28M60sL2mB2IEcBxU+r9C1ksnU7hIIIKLOwZ0auKIiZMFoYeJnZs+24OFDipGAmdk UJ93Dy8FJ8zG/0UDaPZzwQrQCXhAB5nrql7PlLz5wOSHnMv+z8ULx3sOFGv060TXEANyHWHR8WWRW 8tyCVv9A==; Received: from [184.19.31.139] (port=41602) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1kVNA2-006fkn-DV; Wed, 21 Oct 2020 19:04:50 -0400 Subject: Re: Mop-up around psql's \connect behavior To: Tom Lane , pgsql-hackers@lists.postgresql.org References: <235210.1603321144@sss.pgh.pa.us> From: Chapman Flack Message-ID: <5F90BE91.5030306@anastigmatix.net> Date: Wed, 21 Oct 2020 19:04:49 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <235210.1603321144@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 10/21/20 18:59, Tom Lane wrote: > I think the reason we've not had complaints about this is that the > situation normally doesn't arise in interactive sessions (since we > won't release the old connection voluntarily), while scripts are > likely not designed to cope with connection losses anyway. These > facts militate against spending a whole lot of effort on a fix, > but still we ought to reduce the silliness factor. What I propose > is to complain if we have no o_conn *and* we are asked to re-use > parameters from it. Otherwise, it's fine. I've been getting around it just by saying \c "connstring" . . . which works. It gives me a tiny thrill every time I do it, like I'm getting away with something. Which is why I haven't been complaining. I suppose I wouldn't complain if it were fixed, either. Regards, -Chap