Re: Bug in pg_restore with EventTrigger in parallel mode
Fabrízio de Royes Mello <fabriziomello@gmail.com>
From: Fabrízio de Royes Mello <fabriziomello@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2020-02-20T18:36:01Z
Lists: pgsql-hackers
Attachments
- fix_pg_restore_parallel_with_event_trigger_v2.patch (text/x-patch) patch v2
On Thu, Feb 20, 2020 at 4:52 AM Michael Paquier <michael@paquier.xyz> wrote: > > That sounds right, as event triggers could interact with GRANT and > REFRESH of matviews, so they should be logically last. Looking at the > recent commit history, this would be similar to 3eb9a5e as we don't > really have a way to treat event triggers as dependency-sortable > objects. > Indeed... event triggers should be the last thing to be restored. > What kind of errors did you see in this customer > environment? Errors triggered by one or more event triggers blocking > some commands based on a tag match? > By error I meant the weird behavior I described before that pg_restore create the event triggers in parallel mode and after that other objects are created then the event trigger is fired during the restore... Have a look at the new attached patch. Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
Commits
-
Fix pg_dump/pg_restore to restore event triggers later.
- 8728b2c70357 13.0 landed
- fab5456356c2 9.6.18 landed
- f5d49f22653e 11.8 landed
- 4c40b27b5064 12.3 landed
- 475b061c8675 10.13 landed
- 0b02476442d5 9.5.22 landed