From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Completing PL support for Event Triggers |
Date: | 2013-11-26 11:59:41 |
Message-ID: | 1385467181.13003.2.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I made one significant change in the PL/Perl patch. You had this in
plperl_event_trigger_handler():
+ /*
+ * Create the call_data before connecting to SPI, so that it is not
+ * allocated in the SPI memory context
+ */
+ current_call_data = (plperl_call_data *) palloc0(sizeof(plperl_call_data));
+ current_call_data->fcinfo = fcinfo;
I think this is wrong, and the reason it crashes if you remove it is
that you need to call increment_prodesc_refcount(prodesc), like in the
other handlers.
Attached is my "final" patch. Let me know if it's OK for you.
Attachment | Content-Type | Size |
---|---|---|
0001-PL-Perl-Add-event-trigger-support.patch | text/x-patch | 12.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Rajeev rastogi | 2013-11-26 12:03:23 | Re: TODO: Split out pg_resetxlog output into pre- and post-sections |
Previous Message | Kyotaro HORIGUCHI | 2013-11-26 11:42:42 | Re: Get more from indices. |