Re: Are stored procedures always kept in memory?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Roman Golis <rgolis(at)aps-holding(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Are stored procedures always kept in memory?
Date: 2012-08-07 14:19:04
Message-ID: CAFj8pRBL2-nYVXdvcFzSB85GzjbyEmf572PTtwcMyBsg-nMi2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-08-07 14:19:13 Re: warnings about invalid "search_path"
Previous Message Roman Golis 2012-08-07 14:12:11 Are stored procedures always kept in memory?