Re: Do "after update" trigger block the current transaction?

Поиск
Список
Период
Сортировка
От Clemens Eisserer
Тема Re: Do "after update" trigger block the current transaction?
Дата
Msg-id CAFvQSYQSv_kjvUnsFUzg7+j6ZdwhDQU6UBmnsRtsyTnmDsWzwA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Do "after update" trigger block the current transaction?  (Richard Huxton <dev@archonet.com>)
Ответы Re: Do "after update" trigger block the current transaction?
Список pgsql-general
Hi Richard,

>>  Will triggers (after
>> update specifically) cause the execution of SQL-commands to pause
>> until the trigger-function has returned (at statement execution time
>> or commit)?
>
> The trigger will block. If it didn't then it couldn't abort the transaction
> if it needed to.

Thanks for the clarification.

> Why not use one of the established trigger-based replication solutions?

Because the "other" database which I would like to keep in sync is a
MySQL db. Furthermore I do not need a 1:1 replica, but instead just
update a few columns in different tables there.

My inital plan was to add a timestamp-column which is updated at every
Update and to poll for changes every 5-10s. However, the word
"polling" seems to cause an allergic reaction for some poeple ;)

Thanks, Clemens


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

Предыдущее
От: Daniel Cristian Cruz
Дата:
Сообщение: Re: Bad plan on a huge table query
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: effective_io_concurrency on Windows