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+pn7NY_p9RGnJJ+m+wwect9jTDdhCz69mgW5F1Ubo1wLg@mail.gmail.com
Whole thread Raw
In response to Re: Bug in pg_restore with EventTrigger in parallel mode  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug in pg_restore with EventTrigger in parallel mode  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Mar 9, 2020 at 12:27 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> In the case of event triggers, the obvious counterexample is that if
> you restore ET A and then ET B, ET A might interfere with the attempt
> to restore ET B.  (And we have no way to know whether restoring B
> before A would be better or worse.)
>

Yeap... you're correct.


> So on the whole I find "restore matviews as if they'd been refreshed
> after the restore" to be a more trustworthy approach than the other
> way.  At some level we have to trust that ETs aren't going to totally
> bollix the restore.
>

Ok.

> Which, TBH, makes me wonder about the validity of the original complaint
> in this thread.  I don't mind delaying ET restore as long as we feasibly
> can; but if you have an ET that is going to misbehave during restore,
> you are in for pain, and it's hard to consider that that pain isn't
> self-inflicted.
>

The proposed patch solve the original complain. I was just trying to understand completely what you pointed out before and I agree with you. Thanks for the clear explanation.

About the patch LGTM and IMHO we should back-patch it to all supported versions. 

Regards,

--
   Fabrízio de Royes Mello         Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

pgsql-hackers by date:

Previous
From: "曾文旌(义从)"
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Peter Geoghegan
Date:
Subject: Re: pgsql: pageinspect: Fix types used for bt_metap() columns.