How to identify trigger is called from the node where row is created

Поиск
Список
Период
Сортировка
От Satish S
Тема How to identify trigger is called from the node where row is created
Дата
Msg-id CAFjtqz9DQihxwpRbDk16isdenwKg=chcsJ08PcqAPv4PrqP6pQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to identify trigger is called from the node where row is created  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
Hi,

I have a cluster of three nodes A, B, C and I'm using postgres bdr for replication.

I have some code to execute after a value change in the table, for this I have added a trigger.

When I call POST REST API from any one of the nodes it will execute the code, and on all other nodes the trigger will execute the code. The issue is the trigger will execute the code on the same node as well where POST call is happening.

Ex. POST REST API on node B. Directly execute a+b. save a and b in DB. response

Trigger activates on all nodes. And it will execute a+b on all nodes. (but I don't want to execute it again on node B)

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

Предыдущее
От: Andrew Gierth
Дата:
Сообщение: Re: gs_group_1 crashing on 13beta2/s390x
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions