From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Les <nagylzs@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: possible bug
Date: Fri, 21 Oct 2022 10:57:11 -0700
Message-ID: <454edd02-f3ab-4fa2-08e1-9658e27eaa0c@aklaver.com> (raw)
In-Reply-To: <CAKXe9UBmUy-GGb8h91CXe+KKfcTmW0k=F0_5k5AAz0Psdg85eg@mail.gmail.com>
References: <CAKXe9UBmUy-GGb8h91CXe+KKfcTmW0k=F0_5k5AAz0Psdg85eg@mail.gmail.com>
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.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, nagylzs@gmail.com
Subject: Re: possible bug
In-Reply-To: <454edd02-f3ab-4fa2-08e1-9658e27eaa0c@aklaver.com>
References: <CAKXe9UBmUy-GGb8h91CXe+KKfcTmW0k=F0_5k5AAz0Psdg85eg@mail.gmail.com> <454edd02-f3ab-4fa2-08e1-9658e27eaa0c@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox