| From: | Bryan Green <dbryan(dot)green(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | [PATCH] Make select_views regression test output deterministic |
| Date: | 2026-08-09 04:38:33 |
| Message-ID: | dcc103ef-e669-4d0c-a9ea-f6da0b81c590@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| 0001-Make-select_views-regression-test-output-determinist.patch | text/plain | 118.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chengpeng Yan | 2026-08-09 06:41:07 | Re: arrays over initdb-created types are broken after pg_upgrade |
| Previous Message | Bryan Green | 2026-08-09 03:54:51 | Re: [PATCH] Release a replication slot leaked by a caught subtransaction error |