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

2019-12-12 Thread Jeremy Finzel
On Tue, Dec 10, 2019 at 8:25 AM Jeremy Finzel wrote: > Is there a way for me to test this theory? I tried the following with no > change in behavior: > >1. Disable write load to table >2. Vacuum analyze table (not vac full) >3. Create index >4. Explain > > Still did not pick up t

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

2019-12-10 Thread Jeremy Finzel
On Tue, Dec 10, 2019 at 12:09 AM Tom Lane wrote: > Yeah. The reported behavior can mostly be explained if we assume > that there's some HOT chain in the table that involves an update > of this particular column, so that if we build an index on that > column we see a broken HOT chain, but buildin

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

2019-12-09 Thread Tom Lane
Jerry Sievers writes: > I suspect this was due to indcheckxmin=true for the involved index and > the documented (but IMO confusing) interplay w/broken hot-chains and > visibility. Yeah. The reported behavior can mostly be explained if we assume that there's some HOT chain in the table that invol

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

2019-12-09 Thread Jerry Sievers
Peter Geoghegan writes: > On Mon, Dec 9, 2019 at 6:33 PM Michael Paquier wrote: > >> Something new as of 11 is that btree indexes can be built in parallel, >> and before releasing it we found some bugs with covering indexes. >> Perhaps we have an issue hidden behind one of these, but hard to be

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

2019-12-09 Thread Peter Geoghegan
On Mon, Dec 9, 2019 at 6:33 PM Michael Paquier wrote: > Something new as of 11 is that btree indexes can be built in parallel, > and before releasing it we found some bugs with covering indexes. > Perhaps we have an issue hidden behind one of these, but hard to be > sure. I doubt it. Jeremy did

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

2019-12-09 Thread Michael Paquier
On Mon, Dec 09, 2019 at 03:51:39PM -0500, Jeff Janes wrote: > On Mon, Dec 9, 2019 at 1:00 PM Jeremy Finzel 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 cardin

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

2019-12-09 Thread Jeff Janes
On Mon, Dec 9, 2019 at 1:00 PM Jeremy Finzel 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