disable triggers isolated to transaction only?
От | Vick Khera |
---|---|
Тема | disable triggers isolated to transaction only? |
Дата | |
Msg-id | 2968dfd61003020948x60e84d8aiaa1df01658853cb3@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: disable triggers isolated to transaction only?
Re: disable triggers isolated to transaction only? Re: disable triggers isolated to transaction only? |
Список | pgsql-general |
I'm planning to split a large table into partitions. During the migration, all new data will be added to the sub-tables, and I will be moving the data from the master table to the proper sub tables at the same time. The trick is that I have an INSERT trigger to keep track of various counters. I need to be able to disable that trigger for the data I'm moving, yet leave it intact for the new data being inserted. My question is this: will ALTER TABLE ONLY $subtable DISABLE TRIGGER ALL within a transaction only affect my transaction, or will it affect anyone inserting into this subtable. If it blocks external inserts that's ok since my transactions are small while moving the data. I guess at worse I lock the table.
В списке pgsql-general по дате отправления: