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 1phzGk-0004hU-60 for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Mar 2023 20:53:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1phzGi-0007oC-GZ for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Mar 2023 20:53:12 +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 1phzGi-0007o3-71 for pgsql-hackers@lists.postgresql.org; Thu, 30 Mar 2023 20:53:12 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phzGe-0006ys-Gj for pgsql-hackers@postgresql.org; Thu, 30 Mar 2023 20:53:10 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 5058B2F83647 for ; Thu, 30 Mar 2023 22:53:05 +0200 (CEST) Received: from s981.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 41CFA2E29939; Thu, 30 Mar 2023 22:53:05 +0200 (CEST) Received: from s474.loopia.se (unknown [172.22.191.6]) by s981.loopia.se (Postfix) with ESMTP id 3F95422B1712; Thu, 30 Mar 2023 22:53:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s979.loopia.se ([172.22.191.6]) by s474.loopia.se (s474.loopia.se [172.22.190.14]) (amavisd-new, port 10024) with LMTP id 9FYJqXnK5-Sq; Thu, 30 Mar 2023 22:53:04 +0200 (CEST) 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 8F15110BC3A3; Thu, 30 Mar 2023 22:53:04 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Subject: Re: pgsql: Clean up role created in new subscription test. From: Daniel Gustafsson In-Reply-To: <284965.1680208176@sss.pgh.pa.us> Date: Thu, 30 Mar 2023 22:53:03 +0200 Cc: Robert Haas , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <2A3A15B2-FD71-4767-9A01-4C2C9264F960@yesql.se> References: <267900.1680201870@sss.pgh.pa.us> <99112997-6732-42C7-989B-06406C911FE2@yesql.se> <284965.1680208176@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3696.120.41.1.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 30 Mar 2023, at 22:29, Tom Lane wrote: > Daniel Gustafsson writes: >>> On 30 Mar 2023, at 20:44, Tom Lane wrote: >>> Another idea could be for pg_regress to enforce that "select = count(*) >>> from pg_roles" gives the same answer before and after the test run. >=20 >> That wouldn't prevent the contents of pg_roles to have changed = though, so there >> is a (slim) false positive risk with that no? >=20 > Well, we could do "select rolname from pg_roles order by 1" and > actually compare the results of the two selects. That might be > advisable anyway, in order to produce a complaint with useful > detail when there is something wrong. I can see the value in doing something like this to keep us honest. -- Daniel Gustafsson