mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Improve hash_any() to use word-wide fetches when hashing suitably aligned
data. This makes for a significant speedup at the cost that the results now vary between little-endian and big-endian machines; which forces us to add explicit ORDER BYs in a couple of regression tests to preserve machine-independent comparison results. Also, force initdb by bumping catversion, since the contents of hash indexes will change (at least on big-endian machines). Kenneth Marshall and Tom Lane, based on work from Bob Jenkins. This commit does not adopt Bob's new faster mix() algorithm, however, since we still need to convince ourselves that that doesn't degrade the quality of the hashing.
This commit is contained in:
@ -340,7 +340,15 @@ UNION
|
||||
(SELECT * from dblink_get_result('dtest3') as t3(f1 int, f2 text, f3 text[]))
|
||||
ORDER by f1;
|
||||
|
||||
SELECT dblink_get_connections();
|
||||
-- dblink_get_connections returns an array with elements in a machine-dependent
|
||||
-- ordering, so we must resort to unnesting and sorting for a stable result
|
||||
create function unnest(anyarray) returns setof anyelement
|
||||
language sql strict immutable as $$
|
||||
select $1[i] from generate_series(array_lower($1,1), array_upper($1,1)) as i
|
||||
$$;
|
||||
|
||||
SELECT * FROM unnest(dblink_get_connections()) ORDER BY 1;
|
||||
|
||||
SELECT dblink_is_busy('dtest1');
|
||||
|
||||
SELECT dblink_disconnect('dtest1');
|
||||
|
Reference in New Issue
Block a user