Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gW3Bs-0003X8-E2 for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Dec 2018 17:48:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gW3Bo-000504-OY for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Dec 2018 17:48:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gW3Bo-0004zv-HN for pgsql-hackers@lists.postgresql.org; Sun, 09 Dec 2018 17:48:24 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gW3Bh-0000wz-99 for pgsql-hackers@postgresql.org; Sun, 09 Dec 2018 17:48:23 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 635125F7A0; Sun, 9 Dec 2018 12:48:15 -0500 (EST) Date: Sun, 9 Dec 2018 12:48:15 -0500 From: Stephen Frost To: Michael Paquier Cc: Tom Lane , Postgres hackers , Amit Langote Subject: Re: pg_partition_tree crashes for a non-defined relation Message-ID: <20181209174815.GD3415@tamriel.snowman.net> References: <20181207010406.GO2407@paquier.xyz> <20181207230540.GA12740@paquier.xyz> <6105.1544243612@sss.pgh.pa.us> <20181208065436.GC1989@paquier.xyz> <20181208134608.GY3415@tamriel.snowman.net> <20181208231507.GA1833@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aNC6T5u32QnGnwux" Content-Disposition: inline In-Reply-To: <20181208231507.GA1833@paquier.xyz> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --aNC6T5u32QnGnwux Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Michael Paquier (michael@paquier.xyz) wrote: > On Sat, Dec 08, 2018 at 08:46:08AM -0500, Stephen Frost wrote: > > I wonder if we maybe should have a regression test for every such > > function which just queries the catalog in a way to force the function > > to be called for every relation defined in the regression tests, to > > ensure that it doesn't segfault or throw an error.. >=20 > Like sqlsmith? It looks hard to me to make something like that part of > the main regression test suite, as that's going to be costly and hard to > scale with. No, I mean something like: with x as (select pg_partition_tree(relname) from pg_class) select 1 from x limit 1; or whatever it takes to make sure that the function is run against every entry in pg_class (or whatever is appropriate) while not returning the results (since we don't actually care about the output, we just want to make sure it doesn't ERROR or crash). sqlsmith, as I recall, doesn't care about ERROR cases, it's just looking for crashes, so it's not quite the same thing. Thanks! Stephen --aNC6T5u32QnGnwux Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJcDVVfAAoJEO1sijiDR2RV6UsQAISc4afcxzTjUt1i1L97QZ1j zGLRB8Nu4ah7R6Xm5sGB7vtFbRFoKf0n/Vq6WsRclOFnIlRWb8l5n3V6ryD9UwfW rnY8a5BU3/YpVZCeaWeqpPNpW+d1lKZCnMtXy8M5rmfqzOCLyfZkr+7Tm/WFFhKG N6qzdrniPVIxr3jdGVlrO4k+u5u3b9PQE1cUnVMd6I2Y6Xzjrv5QUQ+XItl8+omm rr25/yjo0TVQNrNwrJzr0MJg9kkP68F+GtxrZS0+JHUsONzqyEeExtzaJXMAzKMP cqbBZQMxYhJbqvGu3H8stTUqFkcRSDCV5rQ4bHTt85dvjuMCtbEQCl63frmgcYBM rwhSf51+gMpkNE3aEJOBx7AYaLHl4CKiUtyhLAhkB8MZCsCEiFUi6LsHGsww0vAL uvbie6fIfNv9w68LVtHvQFAROM32Fbm1EJWF7EBBlmwxAZxFUeb15x4WiB+6gWjf BVT3XWH8IxyY947e2hkAj0M/Bi6zvz82RWPnIpxfVJsOUuHMLupWOA9sByACZ943 HZgzTwjM5cWcdbc/Vt9sLkyM9sWNyitruzAiXyyoPH162jPqDZ9AGbfwJD384wfw hjpU86J5YR99ja+yR0XEquRtOfitJnIA07fX+woKqNZGh0U53jzARm5HWR5wOXp9 T5pvbdz+J11ztrtIF1qu =Njk5 -----END PGP SIGNATURE----- --aNC6T5u32QnGnwux--