Non-reentrant plperlu function & concurrent access

Поиск
Список
Период
Сортировка
От Philippe Lang
Тема Non-reentrant plperlu function & concurrent access
Дата
Msg-id 8AE5A725DAF7364F97FF75D99E45B6575B98401A@SBS1.attiksystem.local
обсуждение исходный текст
Ответы Re: Non-reentrant plperlu function & concurrent access
Список pgsql-general
Hi,

I have a non-reentrant plperlu function, which does no database modification. It basically stores input data into a
file,calls a unix shell command, and reads the result back from another file. 

I don't really care about database isolation here, phantom reads and such. It is not likely to be a problem. What could
bea problem, is if another call to this function is fired while another one is running. 

In this specific case, I could solve the problem by generating random input and ouput filenames, but I would prefer a
moregeneral solution, like using some sort of mutex for the function. What is the best way to do that under Postgresql?
Althoughnot designed for this (if I understand correctly), would a "serializable" isolation level help here? 

Best regards!

-------------------------------------------------------------
Attik System              web  : http://www.attiksystem.ch
Philippe Lang             phone: +41 26 422 13 75
rte de la Fonderie 2      gsm  : +41 79 351 49 94
1700 Fribourg             pgp  : http://keyserver.pgp.com



Вложения

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

Предыдущее
От: Sandeep Srinivasa
Дата:
Сообщение: Re: Relationship between ulimit and effective_cache_size, work_mem, shared_buffers, maintenance_work_mem and vacuum
Следующее
От: Philippe Lang
Дата:
Сообщение: Re: Non-reentrant plperlu function & concurrent access