Trigger function in a multi-threaded environment behavior

Поиск
Список
Период
Сортировка
От Hardik Belani
Тема Trigger function in a multi-threaded environment behavior
Дата
Msg-id AANLkTilySnCvFjNTsnRPazv7nyep_Pa1wx7Wa2j9YhqE@mail.gmail.com
обсуждение исходный текст
Ответы Re: Trigger function in a multi-threaded environment behavior  (Peter Eisentraut <peter_e@gmx.net>)
Re: Trigger function in a multi-threaded environment behavior  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
 
We have a multi-threaded environment in linux where multiple threads are performing database operations(insert, update, select and at times delete as well) in transaction mode (which may span across stored

procedures) using unixodbc. Now this as is, works fine.

 

If we introduce postgres triggers (trigger functions) on some of the tables to track insert/update/delete operations, (This is done by keeping and updating a counter field for every insert, update and delete operation performed on a set of tables inside trigger function) at this point, one or more threads get stuck in lock while executing the query, to the extent that sometimes even with the pgadmin, the database tables cannot be updated.

 

We are using postgres v8.4 and unixodbc v2.2.14.

 

Here in this case when using postgres triggers in a multithreaded application, do we have to take care of table/row level locks inside trigger function.

 

Thanks,

Hardik

 

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Keepalive for max_standby_delay
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Trigger function in a multi-threaded environment behavior