Re: [PATCH] ALTER TABLE ADD FOREIGN KEY to partitioned table, is not parallelized

Dimitrios Apostolou <jimis@gmx.net>

From: Dimitrios Apostolou <jimis@gmx.net>
To: Frédéric Yhuel <frederic.yhuel@dalibo.com>
Cc: pgsql-performance@lists.postgresql.org, bruce@momjian.us, Christophe Courtois <christophe.courtois@dalibo.com>
Date: 2025-06-17T16:23:09Z
Lists: pgsql-performance
>
> FWIW I implemented a pg_restore --freeze patch, see attached. It needs 
> another patch of mine from [1] that implements pg_restore --data-only 
> --clean, which for parallel restores encases each COPY in its own transaction 
> and prepends it with a TRUNCATE. All feedback is welcome.
>
> [1] https://www.postgresql.org/message-id/c61263f2-7472-5dd8-703d-01e683421f61%40gmx.net
>
> It works really fast for the data, and I see that some, but not all items 
> from section=post-data, start parallel plans. For example I see CREATE INDEX 
> spawns parallel workers.

I added it to July's commitfest, mostly to trigger discussion around the 
issue.

https://commitfest.postgresql.org/patch/5826/

Not sure how to mark on the commitfest page that the patch requires 
another patch from another commitfest entry.


Dimitris




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Set PD_ALL_VISIBLE and visibility map bits in COPY FREEZE