Thread: pg_restore, custom setting, and materialized view -- performance question

pg_restore, custom setting, and materialized view -- performance question

From
Wells Oliver
Date:
More of a general question here, but I notice when restoring a ~750GB database and using very specific settings to help the performance, the materialized view section at the end takes hours and hours, whereas everything prior to that is very tidy and efficient, maybe two hours with 8 parallel jobs.

What I found then was doing pg_restore while excluding the materialized view data at the end, then switching the database to more 'proper' production settings, and then concurrently refreshing the materialized views (the restore does not seem to want to try concurrently) is far more efficient. 

I was wondering if anyone else had this experience and if anyone else executed a restore in such a fashion?

psql 13.3

--