Re: Loading table with indexed jsonb field is stalling - Mailing list pgsql-general

From Ron
Subject Re: Loading table with indexed jsonb field is stalling
Date
Msg-id 563e995f-d7b1-7e2f-c1f1-b00db7a18589@gmail.com
Whole thread Raw
In response to Re: Loading table with indexed jsonb field is stalling  (Will Hartung <willhartung@gmail.com>)
Responses Re: Loading table with indexed jsonb field is stalling
List pgsql-general
On 5/20/19 4:48 PM, Will Hartung wrote:
>> On May 20, 2019, at 2:36 PM, Ron <ronljohnsonjr@gmail.com> wrote:
>> I think you answered this earlier, but does the same stalling happen when indexes are dropped?
> No, the data loads fine.
>
> The way I originally stumbled upon this was that I had off loaded the data for some other kinds of testing.
>
> There are several indexes in production, but for my local testing, I only had one on the pk.

And it pathologically loads even when there's just a PK on the numeric field?

> Then, one day, I wanted to look for something, and decided I’ll build the json index “real quick”.
>
> Being me, it wasn’t until a few days later I’m like “why is my machine busy, what’s that grinding sound” (I rarely
hearmy drive, most work is done on SSD).
 
>
> Then I realized that the index was still being built, several days later.
>
> “Huh”
>
> And I left it again.
>
> I was, again, not really paying attention, and didn’t realize until 2 weeks after I had started that it was STILL
running.
>
> At that point I killed it.
>
> Then I decided to break the file up and load it in chunks, see “how far” it was getting, etc. It did not take long
forit to get stuck.
 
>
> I tried it on different versions of PG, now on different OS’s (albeit one is in a VM). It wasn’t a crisis, just a
curiosity.
>
> But we had a scary event couple of weeks ago that may have forced us to reload the table, but, thankfully, didn’t and
werecovered. But got me to thinking about poking at it again.
 

Drop all indexes, load data, recreate indexes?

> A colleague is trying to pg_restore our production DB for a conversion test to AWS Aurora, and it’s been stuck for 43
hourson 68M row loaded table. So, it’s systemic with our data, and I believe that we can not reload this table
currently.Which is scary.
 

But pg_restore only creates indexes AFTER the data loads.

-- 
Angular momentum makes the world go 'round.



pgsql-general by date:

Previous
From: Will Hartung
Date:
Subject: Re: Loading table with indexed jsonb field is stalling
Next
From: Will Hartung
Date:
Subject: Re: Loading table with indexed jsonb field is stalling