Re: [BUGS] 10.0: Logical replication doesn't execute BEFORE UPDATEOF trigger
В списке pgsql-bugs по дате отправления:
| От | Aleksander Alekseev |
|---|---|
| Тема | Re: [BUGS] 10.0: Logical replication doesn't execute BEFORE UPDATEOF |
| Дата | |
| Msg-id | 20171010102613.GA28161@e733.localdomain обсуждение исходный текст |
| Ответ на |
Re: [BUGS] 10.0: Logical replication doesn't execute BEFORE UPDATE OF |
| Список | pgsql-bugs |
Hi Masahiko, > > I think the cause of this issue is that the apply worker doesn't set > > updatedCols of RangeTblEntry when applying updates. So TriggerEnabled > > always ends up with false. I'll make a patch and submit. > > > > Attached patch store the updated columns bitmap set to RangeTblEntry. > In my environment this bug seems to be fixed by the patch. Thanks a lot for a quick response. I can confirm that your patch fixes the issue and passes all tests. Hopefully someone will merge it shortly. Here is another patch from me. It adds a corresponding TAP test. Before applying your patch: ``` t/001_rep_changes.pl .. ok t/002_types.pl ........ ok t/003_constraints.pl .. 1/5 # Failed test 'check replica trigger with specified list of affected columns applied on subscriber' # at t/003_constraints.pl line 151. # got: 'k2|v1' # expected: 'k2|v1 # triggered|true' # Looks like you failed 1 test of 5. t/003_constraints.pl .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/5 subtests t/004_sync.pl ......... ok t/005_encoding.pl ..... ok t/006_rewrite.pl ...... ok t/007_ddl.pl .......... ok ``` After: ``` t/001_rep_changes.pl .. ok t/002_types.pl ........ ok t/003_constraints.pl .. ok t/004_sync.pl ......... ok t/005_encoding.pl ..... ok t/006_rewrite.pl ...... ok t/007_ddl.pl .......... ok All tests successful. ``` -- Best regards, Aleksander Alekseev
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера