postgres.git / summary / log / commit / refs

commit    aeaf2fc0ddbfb1e4a706555e33d9b4165d110a1c
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Wed Feb 25 15:51:42 2026 +0000
First released in: 14.23, 15.18, 16.14, 17.10, 18.4

    Stabilize output of new isolation test insert-conflict-do-update-4.
    
    The test added by commit 4b760a181 assumed that a table's physical
    row order would be predictable after an UPDATE.  But a non-heap table
    AM might produce some other order.  Even with heap AM, the assumption
    seems risky; compare a3fd53bab for instance.  Adding an ORDER BY is
    cheap insurance and doesn't break any goal of the test.
    
    Author: Pavel Borisov <pashkin.elfe@gmail.com>
    Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
    Discussion: https://postgr.es/m/CALT9ZEHcE6tpvumScYPO6pGk_ASjTjWojLkodHnk33dvRPHXVw@mail.gmail.com
    Backpatch-through: 14


src/test/isolation/expected/insert-conflict-do-update-4.out | 8 ++++---- src/test/isolation/specs/insert-conflict-do-update-4.spec | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/isolation/expected/insert-conflict-do-update-4.out b/src/test/isolation/expected/insert-conflict-do-update-4.out index 6e96e0d12da..80af2798a94 100644 --- a/src/test/isolation/expected/insert-conflict-do-update-4.out +++ b/src/test/isolation/expected/insert-conflict-do-update-4.out @@ -12,11 +12,11 @@ step insert1: INSERT INTO upsert VALUES (1, 11, 111) step update2a: UPDATE upsert SET i = i + 10 WHERE i = 1; step c2: COMMIT; step insert1: <... completed> -step select1: SELECT * FROM upsert; +step select1: SELECT * FROM upsert ORDER BY i; i| j| k --+--+--- -11|10|100 1|11|111 +11|10|100 (2 rows) step c1: COMMIT; @@ -33,7 +33,7 @@ step insert1: INSERT INTO upsert VALUES (1, 11, 111) step update2b: UPDATE upsert SET i = i + 150 WHERE i = 1; step c2: COMMIT; step insert1: <... completed> -step select1: SELECT * FROM upsert; +step select1: SELECT * FROM upsert ORDER BY i; i| j| k ---+--+--- 1|11|111 @@ -54,7 +54,7 @@ step insert1: INSERT INTO upsert VALUES (1, 11, 111) step delete2: DELETE FROM upsert WHERE i = 1; step c2: COMMIT; step insert1: <... completed> -step select1: SELECT * FROM upsert; +step select1: SELECT * FROM upsert ORDER BY i; i| j| k -+--+--- 1|11|111 diff --git a/src/test/isolation/specs/insert-conflict-do-update-4.spec b/src/test/isolation/specs/insert-conflict-do-update-4.spec index 6297b1d1d6c..a62531660d3 100644 --- a/src/test/isolation/specs/insert-conflict-do-update-4.spec +++ b/src/test/isolation/specs/insert-conflict-do-update-4.spec @@ -23,7 +23,7 @@ session s1 setup { BEGIN ISOLATION LEVEL READ COMMITTED; } step insert1 { INSERT INTO upsert VALUES (1, 11, 111) ON CONFLICT (i) DO UPDATE SET k = EXCLUDED.k; } -step select1 { SELECT * FROM upsert; } +step select1 { SELECT * FROM upsert ORDER BY i; } step c1 { COMMIT; } session s2 [parent: 1c7358099cbe]