Re: proposal, patch: allow multiple plpgsql plugins

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Marko Tiikkaja <marko(at)joh(dot)to>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: proposal, patch: allow multiple plpgsql plugins
Date: 2014-02-10 17:04:50
Message-ID: CAFj8pRAAukaodSQMW0oCSi7MjnSXZZM_2WYkjmBwmEEkzvJ=fg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Marko

2014-01-16 23:54 GMT+01:00 Marko Tiikkaja <marko(at)joh(dot)to>:

> Hi Pavel,
>
> First of all, thanks for working on this!
>
>
> On 1/12/14, 8:58 PM, Pavel Stehule wrote:
>
>> I still not happy with plugin_info - it is only per plugin now and should
>> be per plugin and per function.
>>
>
> I'm not sure I understand the point of plugin_info in the first place, but
> what would having a separate info per (plugin, function) achieve that can't
> be done otherwise?
>
>
> As for the current patch, I'd like to see improvements on a few things:
>
> 1) It doesn't currently compile because of extra semicolons in the
> PLpgSQL_plugin struct.
>

fixed

>
> 2) The previous comment above the same struct still talk about the
> rendezvous variable which is now gone. The comment should be
> updated to reflect the new API.
>

removed

>
> 3) The same comment talks about how important it is to unregister a
> plugin if its _PG_fini() is ever called, but the current API does
> not support unregistering. That should probably be added? I'm not
> sure when _PG_fini() would be called.
>

removed

These plugins should not be removed - there is no any mechanism how to
remove active plugin without close session

Regards

Pavel

>
> 4) The comment /* reserved for use by optional plugin */ seems a bit
> weird in its new context.
>
>
> Regards,
> Marko Tiikkaja
>

Attachment Content-Type Size
multiple-plpgsql-plugins-2014-02-10-02.patch text/x-patch 16.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2014-02-10 17:14:39 Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink
Previous Message Andres Freund 2014-02-10 16:41:10 Re: Memory ordering issue in LWLockRelease, WakeupWaiters, WALInsertSlotRelease