Re: Package namespace and Safe init cleanup for plperl [PATCH]

From: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
To: Alex Hunsaker <badalex(at)gmail(dot)com>
Cc: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Package namespace and Safe init cleanup for plperl [PATCH]
Date: 2010-01-30 18:37:07
Message-ID: 20100130183707.GH1141@timac.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 30, 2010 at 11:08:26AM -0700, Alex Hunsaker wrote:
> On Sat, Jan 30, 2010 at 07:51, Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> wrote:
> > On Fri, Jan 29, 2010 at 08:07:30PM -0700, Alex Hunsaker wrote:
> >
> >> Other than those really quite minor questions that are arguably me
> >> nitpicking...  It looks great to me.
> >
> > Great, thanks Alex!
>
> I marked it as ready, though ill add a comment that it depends on the
> other patch to apply cleanly (and if that one gets rebased...
> obviously this one probably will need to as well).

I've rebased and reposted the other patch ("Add on_trusted_init and
on_untrusted_init to plperl") and added it to the commitfest.

I've rebasing this one now and making one minor change: I'm adding an
if (not our $_init++) {
...
}
around the code that adds items to @EvalInSafe and @ShareIntoSafe to
avoid any problems with on_trusted_init code that causes exceptions.

Currently an exception from on_trusted_init will leave the plperl
interpreter in the 'not yet setup' state. So the next use runs
the plc_safe_ok code and the on_trusted_init code again.
This change makes the plc_safe_ok code idempotent so the re-execution
won't cause any problems (except for harmless warnings about the
safe_eval and mksafefunc subs being redefined).

Patch to follow (after getting the kids to bed).

Tim.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-01-30 19:30:31 Hot Standby and VACUUM FULL
Previous Message Alex Hunsaker 2010-01-30 18:08:26 Re: Package namespace and Safe init cleanup for plperl [PATCH]