pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: kokdemir@gmail.com
Subject: BUG #16849: index and table data inconsistency
Date: Tue, 02 Feb 2021 10:33:17 +0000
Message-ID: <16849-17287340f8774148@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16849
Logged by:          Ibrahim Edib Kokdemir
Email address:      kokdemir@gmail.com
PostgreSQL version: 12.2
Operating system:   centos 7
Description:        

I have data in a varchar field like '092', '00000000169', '0000001' and so
on. There is a btree index on this field. my searches are similar to below
ones. 
select searched_field from searched_table where searched_field = '092';

When I search data, it uses the given index and returns no value. But when I
disable index scan, it does a sequential scan and return data. 

We have witnessed this case in one index in our production(11.7) and
staging(12.2) environments on same index.  Then we dropped the index and
recreate it. The problem is solved. But, to me, index and data must be
consistent.



view thread (2+ messages)  latest in thread

Message-ID: <16849-17287340f8774148@postgresql.org>
Permalink:  ../16849-17287340f8774148@postgresql.org/
Also on:    postgresql.org/message-id/16849-17287340f8774148@postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, kokdemir@gmail.com
  Subject: Re: BUG #16849: index and table data inconsistency
  In-Reply-To: <16849-17287340f8774148@postgresql.org>

* 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