Re: Logical replication and AFTER UPDATE triggers [PG 16]

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: Logical replication and AFTER UPDATE triggers [PG 16]
Дата
Msg-id CAPTjJmogtGWxmwkyZQC1VJ_LMtR4AHVOQvENXy3CUJiVcCUVfQ@mail.gmail.com
обсуждение исходный текст
Ответ на Logical replication and AFTER UPDATE triggers [PG 16]  (Chris Angelico <rosuav@gmail.com>)
Список pgsql-general
On Fri, 2 Feb 2024 at 13:20, Chris Angelico <rosuav@gmail.com> wrote:
> create or replace function send_settings_notification() returns
> trigger language plpgsql as $$begin perform
> pg_notify('stillebot.settings', ''); return null; end$$;
> create trigger settings_update_notify after update on
> stillebot.settings execute function send_settings_notification();
> alter table stillebot.settings enable always trigger settings_update_notify;
>

Ah ha! A discovery. It may be that a FOR EACH STATEMENT trigger (which
is the default) does not fire on the subscriber. Converting to FOR
EACH ROW seems to make this function. Does this seem reasonable? I
can't find anything in the docs that confirms it.

ChrisA



В списке pgsql-general по дате отправления:

Предыдущее
От: Greg Sabino Mullane
Дата:
Сообщение: Re: vacuum freeze wait_event BufferPin
Следующее
От: Lok P
Дата:
Сообщение: How to do faster DML