Re: Index corruption / planner issue with one table in my pg 11.6 instance

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Jeremy Finzel <finzelj(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Index corruption / planner issue with one table in my pg 11.6 instance
Date: 2019-12-09 20:51:39
Message-ID: CAMkU=1wswC4_z1cXch+ksjYz+z7jDeKKHztD33Q=pSRcGmqvYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 9, 2019 at 1:00 PM Jeremy Finzel <finzelj(at)gmail(dot)com> wrote:

> I have a table with about 7 million records. I had a query in which I
> needed 2 indexes added, one for a created timestamp field another for an id
> field; both very high cardinality.
>
> First I noticed the query would not use the timestamp index no matter what
> session config settings I used. I finally created a temp table copy of the
> table and verified index is used. Then I rebuilt the main table with
> VACUUM FULL and this caused the index to be used.
>

Were they built with CONCURRENTLY? Do you have any long-open snapshots?

Cheers,

Jeff

>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-12-09 21:00:49 Re: log bind parameter values on error
Previous Message Tom Lane 2019-12-09 20:47:04 Re: log bind parameter values on error