Skip site navigation (1) Skip section navigation (2)

Add on_perl_init and proper destruction to plperl UPDATE v3 [PATCH]

From: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Add on_perl_init and proper destruction to plperl UPDATE v3 [PATCH]
Date: 2010-01-29 13:33:18
Message-ID: 20100129133318.GU38673@timac.local (view raw or flat)
Thread:
Lists: pgsql-hackers
This is an updated version of the third of the patches to be
split out from the former 'plperl feature patch 1'.

It includes changes following discussions with Tom Lane and others.

Changes in this patch:

- Added plperl.on_perl_init GUC for DBA use (PGC_SIGHUP)
   SPI functions are not available when the code is run.

- Added interpreter destruction behaviour
   Hooked via on_proc_exit().
   Only has any effect for normal shutdown.
   END blocks, if any, are run.
   SPI functions will die if called at this time.

This updated version no longer tries to call object destructors.
I've added a note in the Limitations section of the PL/Perl docs.
It also adds a PERL_SET_CONTEXT() that's needed but was missing.

Tim.

Attachment: plperl-initend-procexit3.patch
Description: text/x-patch (17.3 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Mark Cave-AylandDate: 2010-01-29 14:00:23
Subject: [CFReview] Red-Black Tree
Previous:From: Fujii MasaoDate: 2010-01-29 13:28:06
Subject: Re: HS/SR and smart shutdown

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group