Re: Different query result, maybe bad index

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Václav Steiner <steiner(dot)vaclav(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Different query result, maybe bad index
Date: 2021-02-24 12:00:50
Message-ID: CAOBaU_ZXCVBtcC+20ND5yVHF+peLMJCBbb0evC9dZRY1UHohjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On Wed, Feb 24, 2021 at 7:50 PM Václav Steiner <steiner(dot)vaclav(at)gmail(dot)com> wrote:
>

> We have three servers running postgres 9.6, master and two slaves feeded by streaming replication.
> On of those slaves we are getting different query results. The replica was recreated from scratch, but problem persists.
>
> If set enable_indexscan='off' and set enable_bitmapscan='off' we get correct result.
> It looks like problem with some index...?
>
> Can anybody saw such behaviour?

Are those indexes on collatable data type? If yes, the most likely
explanation would be that both server have different underlying
library. If you're on GNU/Linux and one of the server has glibc 2.28
and the other doesn't, don't look any further. See for reference
https://postgresql.verite.pro/blog/2018/08/27/glibc-upgrade.html

> I'll then send of course the table, index, etc. definition if necessary.

That would be helpful, including detail on the server itself.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yi Sun 2021-02-24 13:01:24 Batch update million records in prd DB
Previous Message Laurenz Albe 2021-02-24 11:59:18 Re: Different query result, maybe bad index