Re: Are stored procedures always kept in memory? - Mailing list pgsql-general

From Pavel Stehule
Subject Re: Are stored procedures always kept in memory?
Date
Msg-id CAFj8pRBL2-nYVXdvcFzSB85GzjbyEmf572PTtwcMyBsg-nMi2w@mail.gmail.com
Whole thread Raw
In response to Are stored procedures always kept in memory?  (Roman Golis <rgolis@aps-holding.com>)
List pgsql-general
Hello

>
>
> Now my questions is: Are the stored functions (both plpgsql and plain sql
> functions) kept always in a memory? Or they are stored similarly like
> tables, on the disk, reading them into memory when called and possibly
> release them from memory, if memory is needed for something else?

procedures living in pg_proc table. Before call procedure is loaded,
compiled (to abstract syntax tree) and compiled code (tree) is stored
to session cache. Cache is released after logout or function's update.

Regards

Pavel Stehule


>
>
>
> Thanks for reply.
>
>
>
> R.G.
>
>
>
> ________________________________
> Disclaimer: http://www.aps-holding.com/disclaimer.html

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: warnings about invalid "search_path"
Next
From: "Albe Laurenz"
Date:
Subject: Re: warnings about invalid "search_path"