Re: Restore - disable triggers - when they fired? - Mailing list pgsql-general

From Durumdara
Subject Re: Restore - disable triggers - when they fired?
Date
Msg-id CAEcMXhnYkiVmcKBVzmrQTe-ukb7cxz=cK2nbnY26A=Ywn2p6ng@mail.gmail.com
Whole thread Raw
In response to Re: Restore - disable triggers - when they fired?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Restore - disable triggers - when they fired?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Dear Adrian!


2018-03-20 15:47 GMT+01:00 Adrian Klaver <adrian.klaver@aklaver.com>:


When it would be useful?

https://www.postgresql.org/docs/10/static/app-pgrestore.html
"--disable-triggers

    This option is relevant only when performing a data-only restore. It instructs pg_restore to execute commands to temporarily disable triggers on the target tables while the data is reloaded. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data reload.

    Presently, the commands emitted for --disable-triggers must be done as superuser. So you should also specify a superuser name with -S or, preferably, run pg_restore as a PostgreSQL superuser.




Firstly I supposed that data copy somehow could start the triggers - but how?

Which triggers? Or how they fired with this order?


I have read it, but I don't understand it.

Do you have a good example?

Thanks!
 
dd

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Restore - disable triggers - when they fired?
Next
From: Stuart McGraw
Date:
Subject: postgresql-10.3 on unbuntu-17.10 - how??