[PATCH] Make select_views regression test output deterministic - Mailing list pgsql-hackers

From Bryan Green
Subject [PATCH] Make select_views regression test output deterministic
Date
Msg-id dcc103ef-e669-4d0c-a9ea-f6da0b81c590@gmail.com
Whole thread
List pgsql-hackers
Greetings,

select_views runs "SELECT * FROM street" with no ORDER BY, and its iexit
query, "SELECT name, #thepath", orders only by name and the point count.
Both lean on heap scan order for the rest, so the expected output isn't
deterministic and can shift with page layout or scan order.

The fix gives each query a total ordering (COLLATE "C" so it's
locale-independent).  Since the ordering covers every output column, rows a
scan could reorder are identical in the output anyway, so the result is
stable.

The expected-output diff is large, but it's only reordered rows.  The lines
are wide because thepath is a geometric path column, and no query result
changes.  Full regression passes with the regenerated file.

--
Bryan Green
EDB: https://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] comment/security label for publication/subscription
Next
From: Chengpeng Yan
Date:
Subject: Re: arrays over initdb-created types are broken after pg_upgrade