Hi,

On 2014-03-27 08:02:35 -0400, Tom Lane wrote:
> Buildfarm member prairiedog thinks there's something unreliable about
> commit f01d1ae3a104019d6d68aeff85c4816a275130b3:

> *** 
> /Users/buildfarm/bf-data/HEAD/pgsql.13462/src/test/regress/expected/alter_table.out
>        Thu Mar 27 04:12:40 2014
> --- 
> /Users/buildfarm/bf-data/HEAD/pgsql.13462/src/test/regress/results/alter_table.out
>         Thu Mar 27 04:52:02 2014
> ***************
> *** 2333,2339 ****
>       ) mapped;
>    incorrectly_mapped | have_mappings 
>   --------------------+---------------
> !                   0 | t
>   (1 row)

That's rather odd. It has survived for a couple of months on the other
buildfarm animals now... Could one of you apply the attached patch
adding more details to eventual failures?

Greetings,

Andres Freund

-- 
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
>From b3c2e062b433c866e29066196c4bf555d9c978d2 Mon Sep 17 00:00:00 2001
From: Andres Freund <and...@anarazel.de>
Date: Fri, 28 Mar 2014 21:33:26 +0100
Subject: [PATCH] Add more details to eventual relfilenodemap regression test
 failures.

---
 src/test/regress/expected/alter_table.out | 26 +++++++++++---------------
 src/test/regress/sql/alter_table.sql      | 19 ++++++++-----------
 2 files changed, 19 insertions(+), 26 deletions(-)

diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index 0f0c638..283788f 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -2319,22 +2319,18 @@ Check constraints:
 DROP TABLE alter2.tt8;
 DROP SCHEMA alter2;
 -- Check that we map relation oids to filenodes and back correctly.
--- Don't display all the mappings so the test output doesn't change
--- all the time, but make sure we actually do test some values.
+-- Only display bad mappings so the test output doesn't change all the
+-- time.
 SELECT
-    SUM((mapped_oid != oid OR mapped_oid IS NULL)::int) incorrectly_mapped,
-    count(*) > 200 have_mappings
-FROM (
-    SELECT
-        oid, reltablespace, relfilenode, relname,
-        pg_filenode_relation(reltablespace, pg_relation_filenode(oid)) mapped_oid
-    FROM pg_class
-    WHERE relkind IN ('r', 'i', 'S', 't', 'm')
-    ) mapped;
- incorrectly_mapped | have_mappings 
---------------------+---------------
-                  0 | t
-(1 row)
+    oid, reltablespace, relfilenode, relname
+FROM pg_class,
+    pg_filenode_relation(reltablespace, pg_relation_filenode(oid)) mapped_oid
+WHERE relkind IN ('r', 'i', 'S', 't', 'm')
+    AND (mapped_oid != oid OR mapped_oid IS NULL)
+;
+ oid | reltablespace | relfilenode | relname 
+-----+---------------+-------------+---------
+(0 rows)
 
 -- Checks on creating and manipulation of user defined relations in
 -- pg_catalog.
diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql
index 87973c1..6103b87 100644
--- a/src/test/regress/sql/alter_table.sql
+++ b/src/test/regress/sql/alter_table.sql
@@ -1554,18 +1554,15 @@ DROP TABLE alter2.tt8;
 DROP SCHEMA alter2;
 
 -- Check that we map relation oids to filenodes and back correctly.
--- Don't display all the mappings so the test output doesn't change
--- all the time, but make sure we actually do test some values.
+-- Only display bad mappings so the test output doesn't change all the
+-- time.
 SELECT
-    SUM((mapped_oid != oid OR mapped_oid IS NULL)::int) incorrectly_mapped,
-    count(*) > 200 have_mappings
-FROM (
-    SELECT
-        oid, reltablespace, relfilenode, relname,
-        pg_filenode_relation(reltablespace, pg_relation_filenode(oid)) mapped_oid
-    FROM pg_class
-    WHERE relkind IN ('r', 'i', 'S', 't', 'm')
-    ) mapped;
+    oid, reltablespace, relfilenode, relname
+FROM pg_class,
+    pg_filenode_relation(reltablespace, pg_relation_filenode(oid)) mapped_oid
+WHERE relkind IN ('r', 'i', 'S', 't', 'm')
+    AND (mapped_oid != oid OR mapped_oid IS NULL)
+;
 
 -- Checks on creating and manipulation of user defined relations in
 -- pg_catalog.
-- 
1.8.3.251.g1462b67

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to