Re: Allow parallel plan for referential integrity checks?
От
Frédéric Yhuel
Тема
Re: Allow parallel plan for referential integrity checks?
Дата
Msg-id
37eb5e9a-a094-b8f0-852f-56ac6ed96fac@dalibo.com
Ответ на
Re: Allow parallel plan for referential integrity checks? (Frédéric Yhuel)
Список
Дерево обсуждения
Allow parallel plan for referential integrity checks? Frédéric Yhuel <frederic.yhuel@dalibo.com>
Re: Allow parallel plan for referential integrity checks? Andreas Karlsson <andreas@proxel.se>
Re: Allow parallel plan for referential integrity checks? Frédéric Yhuel <frederic.yhuel@dalibo.com>
Re: Allow parallel plan for referential integrity checks? Robert Haas <robertmhaas@gmail.com>
Re: Allow parallel plan for referential integrity checks? Frédéric Yhuel <frederic.yhuel@dalibo.com>
Re: Allow parallel plan for referential integrity checks? "Imseih (AWS), Sami" <simseih@amazon.com>
Re: Allow parallel plan for referential integrity checks? Frédéric Yhuel <frederic.yhuel@dalibo.com>
Re: Allow parallel plan for referential integrity checks? Frédéric Yhuel <frederic.yhuel@dalibo.com>
Re: Allow parallel plan for referential integrity checks? Ian Lawrence Barwick <barwick@gmail.com>
Re: Allow parallel plan for referential integrity checks? Frédéric Yhuel <frederic.yhuel@dalibo.com>
Re: Allow parallel plan for referential integrity checks? vignesh C <vignesh21@gmail.com>
Re: Allow parallel plan for referential integrity checks? "Gregory Stark (as CFM)" <stark.cfm@gmail.com>
Re: Allow parallel plan for referential integrity checks? Frédéric Yhuel <frederic.yhuel@dalibo.com>
Re: Allow parallel plan for referential integrity checks? Daniel Gustafsson <daniel@yesql.se>
Re: Allow parallel plan for referential integrity checks? Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow parallel plan for referential integrity checks? Frédéric Yhuel <frederic.yhuel@dalibo.com>
Re: Allow parallel plan for referential integrity checks? Frédéric Yhuel <frederic.yhuel@dalibo.com>
Re: Allow parallel plan for referential integrity checks? Frédéric Yhuel <frederic.yhuel@dalibo.com>
Re: Allow parallel plan for referential integrity checks? Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Re: Allow parallel plan for referential integrity checks? vignesh C <vignesh21@gmail.com>
Re: Allow parallel plan for referential integrity checks? vignesh C <vignesh21@gmail.com>
Re: Allow parallel plan for referential integrity checks? Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
On 8/17/23 09:32, Frédéric Yhuel wrote: > > > On 8/10/23 17:06, Juan José Santamaría Flecha wrote: >> Recently I restored a database from a directory format backup and >> having this feature would have been quite useful > > Hi, > > Thanks for resuming work on this patch. I forgot to mention this in my > original email, but the motivation was also to speed up the restore > process. Parallelizing the FK checks could make a huge difference in > certain cases. We should probably provide such a test case (with perf > numbers), and maybe this is it what Robert asked for. I have attached two scripts which demonstrate the following problems: 1a. if the tables aren't analyzed nor vacuumed before the post-data step, then they are index-only scanned, with a lot of heap fetches (depending on their size, the planner sometimes chooses a seq scan instead). 1b. if the tables have been analyzed but not vacuumed before the post-data-step, then they are scanned sequentially. Usually better, but still not so good without a parallel plan. 2. if the visibility maps have been created, then the tables are index-only scanned without heap fetches, but this can still be slower than a parallel seq scan. So it would be nice if pg_restore could vacuum analyze the tables before the post-data step. I believe it would be faster in most cases. And it would be nice to allow a parallel plan for RI checks. Best regards, Frédéric
В списке pgsql-hackers по дате отправления
От: Antonin Houska
Дата: