Re: [PATCH] Store Extension Options

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Store Extension Options
Date: 2013-11-22 12:25:49
Message-ID: CAFcNs+q4_7RxO_sC7GZwoEyNHW+zJbrkv9QKRO-DSv+PtORKnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 21, 2013 at 11:06 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Wed, Nov 20, 2013 at 9:35 PM, Fabrízio de Royes Mello
> <fabriziomello(at)gmail(dot)com> wrote:
> >> > So, with this patch we can do that:
> >> >
> >> > ALTER TABLE foo
> >> > SET (ext.somext.do_replicate=true);
> >> >
> >> > When 'ext' is the fixed prefix, 'somext' is the extension name,
> >> > 'do_replicate' is the
> >> > extension option and 'true' is the value.
> >>
> >> This doesn't seem like a particular good choice of syntax;
> >
> > What's your syntax suggestion?
>
> I dunno, but I doubt that hardcoding ext as an abbreviation for
> extension is a good decision. I also doubt that any fixed prefix is a
> good decision.
>

I use this form to simplify implementation and not change sql syntax, but
we can discuss another way or syntax.

> >> and I also have my doubts about the usefulness of the feature.
> >
> > This feature can be used for replication solutions, but also can be
used for
> > any extension that need do some specific configuration about tables,
> > attributes and/or indexes.
>
> So, create your own configuration table with a column of type regclass.
>

This can be a solution, but with a config table we have some problems:
a) no dependency tracking (pg_depend)
b) no correct locking
c) no relcache
d) harder to do correctly for columns

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rodolfo Campero 2013-11-22 12:37:25 Re: information schema parameter_default implementation
Previous Message Heikki Linnakangas 2013-11-22 12:22:56 Re: Data corruption issues using streaming replication on 9.0.14/9.2.5/9.3.1