Re: Bug in pg_restore with EventTrigger in parallel mode - Mailing list pgsql-hackers

From Fabrízio de Royes Mello
Subject Re: Bug in pg_restore with EventTrigger in parallel mode
Date
Msg-id CAFcNs+rPSoZ+kcdC7PqmDqurj4nPLEtc-vyRZ_krU+Ac++4PyA@mail.gmail.com
Whole thread Raw
In response to Re: Bug in pg_restore with EventTrigger in parallel mode  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Bug in pg_restore with EventTrigger in parallel mode
List pgsql-hackers


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
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: error context for vacuum to include block number
Next
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.