From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Zahir Lalani <ZahirLalani@oliver.agency>
To: Michael Lewis <mlewis@entrata.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Possible corrupt index?
Date: Tue, 16 Apr 2019 10:23:29 -0700
Message-ID: <3275482c-4638-6f22-d480-bbc8fe6b9d2c@aklaver.com> (raw)
In-Reply-To: <AM0PR06MB40042CE1B471960D6091962CA7240@AM0PR06MB4004.eurprd06.prod.outlook.com>
References: <AM0PR06MB4004A8622A0B0ABF2355D771A7240@AM0PR06MB4004.eurprd06.prod.outlook.com>
<CAHOFxGrKj=w6Cg+uSzRmyHv2O696N0vaNZHrv_E5j8MeBgJ=DA@mail.gmail.com>
<AM0PR06MB40042CE1B471960D6091962CA7240@AM0PR06MB4004.eurprd06.prod.outlook.com>
On 4/16/19 10:16 AM, Zahir Lalani wrote:
>>Which version? What are the queries you are running which give unexpected behavior? Have your run explain analyze on those to check >what plan is being used? Have your reindexed all or only the one you suspect?
>
> Hi Michael
>
> Version: PostgreSQL 9.6.12 on x86_64-pc-linux-gnu, compiled by gcc (GCC)
> 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit
Is this the same for the other environments?
What does:
SHOW lc_collate;
produce in each environment?
Are you doing the below through Navicat or psql?
If through Navicat, what happens if you use psql?
>
> LIVE – production environment (as opposed to Dev and UAT)
>
> Query: select id from briefs_master where ext_system_ref = '12345'
>
> Explain:
>
> Seq Scan on briefs_master (cost=0.00..2937.90 rows=1 width=4) (actual
> time=18.082..18.082 rows=0 loops=1)
>
> Filter: ((ext_system_ref)::text = '12345'::text)
>
> Rows Removed by Filter: 31235
>
> Planning time: 0.242 ms
>
> Execution time: 18.096 ms
>
> Reindex was done initially on the primary and then on all in the table.
>
> So when we reset the data into the ext_system_ref field, the next query
> returns fine. However, the issue is that since the system thinks there
> is no primary, we are seeing this value get over-written with a null
> several minutes later as other rows are added
>
> Z
>
--
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, ZahirLalani@oliver.agency, mlewis@entrata.com
Subject: Re: Possible corrupt index?
In-Reply-To: <3275482c-4638-6f22-d480-bbc8fe6b9d2c@aklaver.com>
References: <AM0PR06MB4004A8622A0B0ABF2355D771A7240@AM0PR06MB4004.eurprd06.prod.outlook.com> <CAHOFxGrKj=w6Cg+uSzRmyHv2O696N0vaNZHrv_E5j8MeBgJ=DA@mail.gmail.com> <AM0PR06MB40042CE1B471960D6091962CA7240@AM0PR06MB4004.eurprd06.prod.outlook.com> <3275482c-4638-6f22-d480-bbc8fe6b9d2c@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