Re: "stored procedures" - use cases?

Поиск
Список
Период
Сортировка
От Darren Duncan
Тема Re: "stored procedures" - use cases?
Дата
Msg-id 4DB5E792.4040104@darrenduncan.net
обсуждение исходный текст
Ответ на Re: "stored procedures" - use cases?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut wrote:
> Another point, as there appear to be diverging camps about
> supertransactional stored procedures vs. autonomous transactions, what
> would be the actual use cases of any of these features?  Let's collect
> some, so we can think of ways to make them work.

An analogy I like to use for a very capable DBMS is that of an operating system, 
and each autonomous transaction is like a distinct process/thread in this 
system.  The DBMS is like a virtual machine in which processes/autonomous 
transactions run.

Like with an operating system, a process/auto-transaction can be started by 
another one, or by the OS/DBMS (or a root process/auto), and once running all 
processes are mutually independent to a large extent, in that each has its own 
separatable privileges or state or view of the database, the database being an 
analogy to the file system.

A process/auto-transaction can be started by a DBMS client, analogous to a user, 
but it doesn't have to be.  The message passing feature that Pg has, 
listen/notify, is like inter-process communication between these processes/autos.

A stored procedure always runs within the context of one process/auto, and a 
regular transaction or savepoint or whatever is specific to a process/auto.

Has anyone else thought of the DBMS as operating system analogy?  I don't recall 
specifically reading this anywhere, but expect the thought may be common.

-- Darren Duncan


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Unfriendly handling of pg_hba SSL options with SSL off
Следующее
От: Andres Freund
Дата:
Сообщение: Improving the memory allocator