Обсуждение: BUG #19338: [PG15] Unstable SQL result in test regress/tablespace

Поиск
Список
Период
Сортировка

BUG #19338: [PG15] Unstable SQL result in test regress/tablespace

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      19338
Logged by:          Dmitry Kovalenko
Email address:      d.kovalenko@postgrespro.ru
PostgreSQL version: 15.15
Operating system:   AltLinux-10 ARM64
Description:

Hello!

PG15 has an unstable SQL in test regress/tablespace:

^^^^^^^^^^^^^^^^^^^^/home/test/.../src/test/regress/regression.diffs
diff -U3 /home/test/.../src/test/regress/expected/tablespace.out
/home/test/.../src/test/regress/results/tablespace.out
--- /home/test/.../src/test/regress/expected/tablespace.out     2025-11-30
21:11:56.000000000 +0300
+++ /home/test/.../src/test/regress/results/tablespace.out      2025-11-30
23:17:49.378004420 +0300
@@ -334,9 +334,9 @@
     where c.reltablespace = t.oid AND c.relname LIKE 'part%_idx';
    relname   |     spcname
 -------------+------------------
+ part_a_idx  | regress_tblspace
  part1_a_idx | regress_tblspace
  part2_a_idx | regress_tblspace
- part_a_idx  | regress_tblspace
 (3 rows)

 \d testschema.part
^^^^^^^^^^^^^^^^^^^^


https://github.com/postgres/postgres/blob/134a8ee2240557e8165cffe70d19e48937cece03/src/test/regress/sql/tablespace.sql#L228

---
PG16 has the correct SQL:
     ...
     where c.reltablespace = t.oid AND c.relname LIKE 'part%_idx' ORDER BY
relname;


https://github.com/postgres/postgres/blob/4d288e33b957ce5023dd1ec24b53f02c8a9e8ba0/src/test/regress/sql/tablespace.sql#L226

Could you backport this fix from PG16 to PG15, please?

Thanks&Regards,
Dmitry Kovalenko


Re: BUG #19338: [PG15] Unstable SQL result in test regress/tablespace

От
Tom Lane
Дата:
PG Bug reporting form <noreply@postgresql.org> writes:
> PG15 has an unstable SQL in test regress/tablespace:

I tried to reproduce this, without much success.  For me, that
query gives the same EXPLAIN plan and the same results with
or without ORDER BY.  (It chooses an indexscan that'd naturally
order the results.)  And the v15 regression tests pass fine in
a few different locales I tried, which doesn't surprise me
given the lack of prior complaints.

In short, I think there's more going on here than meets the eye.
Can you give a recipe for reproducing this failure?

            regards, tom lane



Re: BUG #19338: [PG15] Unstable SQL result in test regress/tablespace

От
Dmitry Kovalenko
Дата:
Tom,

This test worked on the VM with 4GB memory, 2 cores and AltLinux-10 that 
is hosted on  ARM where are worked lots of other VMs.

I do not know why this select returns wrong order but do not want to see 
this problem again.

I think, we see a prove of unstable order of SELECT without ORDER BY 
clause )

Regards,

Dmitry Kovalenko

01.12.2025 18:54, Tom Lane пишет:
> PG Bug reporting form <noreply@postgresql.org> writes:
>> PG15 has an unstable SQL in test regress/tablespace:
> I tried to reproduce this, without much success.  For me, that
> query gives the same EXPLAIN plan and the same results with
> or without ORDER BY.  (It chooses an indexscan that'd naturally
> order the results.)  And the v15 regression tests pass fine in
> a few different locales I tried, which doesn't surprise me
> given the lack of prior complaints.
>
> In short, I think there's more going on here than meets the eye.
> Can you give a recipe for reproducing this failure?
>
>             regards, tom lane