Re: possible bug

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Les <nagylzs(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: possible bug
Date: 2022-10-21 17:57:11
Message-ID: 454edd02-f3ab-4fa2-08e1-9658e27eaa0c@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/21/22 10:50 AM, Les wrote:
> Hello,
>
> We had a support request today, and we have narrowed down the problem to
> a query that behaves very strangely. The actual query was much more
> complicated, but I came up with this minimal example.
>
> This is what we have seen inside our application:
>
> select * from test where id in (26643094740, 26437091668);
>
> id         |code|regno|col_3|
> -----------+----+-----+-----+
> 26437091668|TA-T| 2632|    1|
> 26643094740|PEG | 2905|    1|
>
> select * from test where id = 26643094740;
>
> id         |code|regno|col_3|
> -----------+----+-----+-----+
> 26643094740|PEG | 2905|    0|
>
> The problem: value of col_3 changes for id=26643094740 if I query two
> rows vs. one row. This is without changing any data. The problem is 100%
> repeatable, if I query two rows from the same view, then I get different
> data for one of the rows.
>
> I suspect that this is a bug. But I might be wrong. Please help me!

I suspect an index problem. Have you tried reindexing the source table,
kap.course if I am following correctly.

Have there been any issues with the database lately, e.g. crash or other
significant event?

>
> The actual test view looks like this:
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Les 2022-10-21 17:57:59 Re: possible bug
Previous Message Les 2022-10-21 17:50:39 possible bug