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 1kHyck-0007X9-PW for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Sep 2020 00:15:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kHycj-00061L-BK for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Sep 2020 00:15:05 +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 1kHycj-0005zP-3z for pgsql-hackers@lists.postgresql.org; Tue, 15 Sep 2020 00:15:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHycg-00038N-RT; Tue, 15 Sep 2020 00:15:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 08F0Em7R1227661; Mon, 14 Sep 2020 20:14:48 -0400 From: Tom Lane To: Andres Freund cc: Ian Barwick , Michael Paquier , Robert Haas , Thomas Munro , Alvaro Herrera , Daniel Gustafsson , "Jonathan S. Katz" , Alexander Korotkov , PostgreSQL Hackers , Peter Geoghegan , Bruce Momjian , David Rowley Subject: Re: Improving connection scalability: GetSnapshotData() In-reply-to: <20200914231718.gg7v77fx7nvvprjy@alap3.anarazel.de> References: <1013484.1597609043@sss.pgh.pa.us> <20200816203153.xqfvuevinjkweuez@alap3.anarazel.de> <20200816205258.pjvmoljrk7ntqb3n@alap3.anarazel.de> <20200816211146.nodohy6ck6mzfjwi@alap3.anarazel.de> <20200816212657.3vyijoddr2yvgjjc@alap3.anarazel.de> <20200903081554.GB8559@paquier.xyz> <61291ffe-d611-f889-68b5-c298da9fb18f@2ndquadrant.com> <20200908041114.5woxns33iv765fgh@alap3.anarazel.de> <0006ffe6-6f76-c074-3e58-2801cee1c05f@2ndquadrant.com> <20200914231718.gg7v77fx7nvvprjy@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 14 Sep 2020 16:17:18 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1227659.1600128888.1@sss.pgh.pa.us> Date: Mon, 14 Sep 2020 20:14:48 -0400 Message-ID: <1227660.1600128888@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > I think the approach of having a long running psql session is really > useful, and probably would speed up some tests. Does anybody have a good > idea for how to best, and without undue effort, to integrate this into > PostgresNode.pm? I don't really have a great idea, so I think I'd leave > it with a local helper in the new test? You could use the interactive_psql infrastructure that already exists for psql/t/010_tab_completion.pl. That does rely on IO::Pty, but I think I'd prefer to accept that dependency for such tests over rolling our own IPC::Run, which is more or less what you've done here. regards, tom lane