[WIP PATCH v3] Implement "pg_restore --data-only --clean" as a way to skip WAL
От | Dimitrios Apostolou |
---|---|
Тема | [WIP PATCH v3] Implement "pg_restore --data-only --clean" as a way to skip WAL |
Дата | |
Msg-id | 3eebf87a-2928-af48-ce96-c322ee113f62@gmx.net обсуждение исходный текст |
Ответ на | Re: [WIP PATCH v2] Implement "pg_restore --data-only --clean" as a way to skip WAL (Dimitrios Apostolou <jimis@gmx.net>) |
Список | pgsql-hackers |
Attaching v3 of the patch, together with a new test file that tests previously untested flags of pg_restore. Added to July's commitfest: https://commitfest.postgresql.org/patch/5821/ On Thu, 12 Jun 2025, Dimitrios Apostolou wrote: > I wonder about the following in pg_restore.c. > Right now my implementation covers only parallel restore. > In the case of non-parallel restore, I want to make the behaviour similar, > i.e. each worker to issue a TRUNCATE before COPY starts. > But then the StartTransaction() doesn't make sense, as everything might > already be in a transaction because of --single-transaction. > Should I completely skip StartTransaction() if !is_parallel? In the end, I followed the same code path for both parallel and non-parallel pg_restore. It works even with --single-transaction, where apparently there are several nested transactions. The tests pass, so I assume it's OK to start a subtransaction for each table restoration inside the global single-transaction. Dimitris
В списке pgsql-hackers по дате отправления: