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 1r0iG8-007KjF-FO for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Nov 2023 13:06:16 +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 1r0iG6-003Pew-Ji for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Nov 2023 13:06:14 +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 1r0iG6-003Pem-AD for pgsql-hackers@lists.postgresql.org; Wed, 08 Nov 2023 13:06:14 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0iG4-005Lql-7h for pgsql-hackers@postgresql.org; Wed, 08 Nov 2023 13:06:13 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 232052FC4407 for ; Wed, 8 Nov 2023 14:06:11 +0100 (CET) Received: from s979.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 10AB12E27646; Wed, 8 Nov 2023 14:06:11 +0100 (CET) Received: from s472.loopia.se (unknown [172.22.191.5]) by s979.loopia.se (Postfix) with ESMTP id 0CBD410BC4C1; Wed, 8 Nov 2023 14:06:11 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.01 X-Spam-Level: X-Spam-Status: No, score=-1.01 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=disabled Received: from s979.loopia.se ([172.22.191.5]) by s472.loopia.se (s472.loopia.se [172.22.190.12]) (amavisd-new, port 10024) with UTF8LMTP id yNrlgXpgdvuT; Wed, 8 Nov 2023 14:06:10 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from smtpclient.apple (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s979.loopia.se (Postfix) with ESMTPSA id 6117910BC43A; Wed, 8 Nov 2023 14:06:10 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Subject: Re: pgsql: Clean up role created in new subscription test. From: Daniel Gustafsson In-Reply-To: <202311081232.rn3aho5ay6yx@alvherre.pgsql> Date: Wed, 8 Nov 2023 14:06:09 +0100 Cc: Peter Eisentraut , Tom Lane , Robert Haas , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <202311081232.rn3aho5ay6yx@alvherre.pgsql> To: Alvaro Herrera X-Mailer: Apple Mail (2.3696.120.41.1.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 8 Nov 2023, at 13:32, Alvaro Herrera = wrote: >=20 > On 2023-Nov-08, Daniel Gustafsson wrote: >=20 >> Since test_setup.sql is part of the regress schedule and not = pg_regress we >> would have to implement this for each test run (regress, contribs = etc), which >> is what Peter didn't like about the original suggestion. >=20 > Oh, somehow that aspect of his reply failed to register with me. I > agree with your approach of using libpq in pg_regress then. >=20 > I suppose you're just thinking of using PQexec() or whatever, run one > query with sufficient ORDER BY, save the result, and at the end of the > test run just run the same query and compare that they are = cell-by-cell > identical? This sounds a lot simpler than the patch you posted. Correct, that's my plan. The rationale for the earlier patch was to = avoid adding a dependency on libpq, but with that already discussed and done = we can leverage the fact that we can run such queries easy. -- Daniel Gustafsson