man pg-dump + triggers
От | Dan Langille |
---|---|
Тема | man pg-dump + triggers |
Дата | |
Msg-id | 20030310224621.B62620@xeon.unixathome.org обсуждение исходный текст |
Список | pgsql-bugs |
I found this hard to comprehend upon the first reading: When doing a data only dump, pg_dump emits queries to disable triggers on user tables before inserting the data and queries to re-enable them after the data has been inserted. If the restore is stopped in the middle, the system catalogs may be left in the wrong state. I first thought that pg_dump issues a command to disable triggers. What it meant, I think, is that pg_dump includes those commands within the output. Those commands are actually processed/issued by pg_restore (or perhaps psql in a 'psql mydb < mydump.sql' fashion. If my impressions are correct, then I think the following is more appropriate: When doing a data-only dump, pg_dump will output data insert statements that are wrapped with a pair of commands to first disable and then re-enable triggers on user tables. If the restore is stopped in the middle of the inserts, the system catalogs may be left in the wrong state. NOTE: I am not sure that "catalogs may be left in the wrong state" is the correct phrase to use. cheers
В списке pgsql-bugs по дате отправления: