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 1pVWtg-0007rp-5P for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Feb 2023 12:09:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pVWtc-0007BW-U8 for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Feb 2023 12:09:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVWtc-0007BN-L0 for pgsql-hackers@lists.postgresql.org; Fri, 24 Feb 2023 12:09:52 +0000 Received: from udcm-wwu1.uni-muenster.de ([128.176.118.7]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVWta-00011b-IO for pgsql-hackers@lists.postgresql.org; Fri, 24 Feb 2023 12:09:52 +0000 X-IronPort-AV: E=Sophos;i="5.97,324,1669071600"; d="scan'208";a="247018210" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY1.UNI-MUENSTER.DE with ESMTP; 24 Feb 2023 13:09:49 +0100 Received: from [192.168.178.27] (dynamic-093-131-140-052.93.131.pool.telefonica.de [93.131.140.52]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id 1E8B820ADF19; Fri, 24 Feb 2023 13:09:48 +0100 (CET) Message-ID: <65ca67b5-932f-6d3e-554c-d66a3ab700a2@uni-muenster.de> Date: Fri, 24 Feb 2023 13:09:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: Proposal: :SQL_EXEC_TIME (like :ROW_COUNT) Variable (psql) Content-Language: en-US, de-DE To: Kirk Wolak , Maciek Sakrejda Cc: Nikolay Samokhvalov , Tom Lane , Heikki Linnakangas , Peter Eisentraut , PostgreSQL Hackers , Pavel Stehule , Andrey Borodin , Laurenz Albe References: <157609.1677088525@sss.pgh.pa.us> <2f1c8cb9-6f4d-2a03-d069-c4f9c2b574ab@enterprisedb.com> <414445.1677163935@sss.pgh.pa.us> From: Jim Jones In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 23.02.23 20:55, Kirk Wolak wrote: > Everyone, >   I love that my proposal for %T in the prompt, triggered some great > conversations. > >   This is not instead of that.  That lets me run a query and come back > HOURS later, and know it finished before 7PM like it was supposed to! > >   This feature is simple.  We forget to set \timing on... I've been there many times! > We run a query, and we WONDER... how long did  that take. > >   This, too, should be a trivial problem (the code will tell). > >   I am proposing this to get feedback (I don't have a final design in > mind, but I will start by reviewing when and how ROW_COUNT gets set, > and what \timing reports). > >   Next up, as I learn (and make mistakes), this toughens me up... > >   I am not sure the name is right, but I would like to report it in > the same (ms) units as \timing, since there is an implicit > relationship in what they are doing. > >   I think like ROW_COUNT, it should not change because of internal > commands. > So, you guys +1 this thing, give additional comments.  When the > feedback settles, I commit to making it happen. > > Thanks, Kirk > I can see it being pretty handy to check if a certain task involving two different terminal windows was done in the right order. Basically to see what went wrong, e.g. "did I really stop the master database before promoting the replica?" +1 ! Best, Jim