Re: proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure
Date: 2013-12-31 18:45:59
Message-ID: 20131231184559.GX22570@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule escribió:
> Hello
>
> I am working on plpgsql_check and I would to write a protection against
> repeated check - so I need to mark a compiled (cached) function. Now,
> plpgsql extension can store own data to exec state, and I would to some
> similar for plpgsql_function. I believe so it can be useful for any plpgsql
> extension that collects data per signature (and recreating) means so
> refresh is necessary.

I'm not sure I understand this. Do you want to avoid running the
checker if a previous run was seen as successful and function has not
changed? Suppose the function depends on a table. I invoke the check
(it succeeds), then drop the table, then invoke the check again. What
should happen? Conversely, if I invoke the check and it fails, then I
create the table and invoke the check again, what should happen? How
does this idea of yours know when to invalidate the cached result of the
check when unrelated objects, which the function depends on, are
dropped/created/modified?

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2013-12-31 19:22:18 Re: proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure
Previous Message Mark Dilger 2013-12-31 18:43:58 Re: fix_PGSTAT_NUM_TABENTRIES_macro patch