From: | Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com> |
---|---|
To: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH] Store Extension Options |
Date: | 2014-02-28 08:08:46 |
Message-ID: | 20140228080846.GD6848@toroid.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Fabrízio.
Here are a few comments based on a quick look at your updated patch.
At 2014-02-13 22:44:56 -0200, fabriziomello(at)gmail(dot)com wrote:
>
> diff --git a/doc/src/sgml/ref/alter_index.sgml b/doc/src/sgml/ref/alter_index.sgml
> index d210077..5e9ee9d 100644
> --- a/doc/src/sgml/ref/alter_index.sgml
> +++ b/doc/src/sgml/ref/alter_index.sgml
> @@ -82,6 +82,14 @@ ALTER INDEX [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> RESE
> <xref linkend="SQL-REINDEX">
> to get the desired effects.
> </para>
> + <note>
> + <para>
> + A custom name can be used as namespace to define a storage parameter.
> + Storage option pattern: namespace.option=value
> + (namespace=custom name, option=option name and value=option value).
> + See example bellow.
> + </para>
> + </note>
> </listitem>
> </varlistentry>
I was slightly confused by the wording here. I think it would be better
to say something like "Custom storage parameters are of the form
namespace.option" and leave it at that.
(Aside: s/bellow/below/)
> @@ -202,6 +210,17 @@ ALTER INDEX distributors SET (fillfactor = 75);
> REINDEX INDEX distributors;
> </programlisting></para>
>
> + <para>
> + To set a custom storage parameter:
> +<programlisting>
> +ALTER INDEX distributors
> + SET (bdr.do_replicate=true);
> +</programlisting>
> + (bdr=custom name, do_replicate=option name and
> + true=option value)
> +</para>
> +
> +
> </refsect1>
It might be best to avoid using bdr.do_replicate in the example, since
it's still a moving target. It might be better to use a generic example
like somenamespace.optionname=true, in which case the explanation isn't
needed either.
The patch applies and builds fine, the tests pass, and the code looks
OK to me. I don't have a strong opinion on validating custom reloption
values through hooks as discussed earlier in the thread, but the simple
version (i.e. your latest patch) seems at least a useful starting point.
-- Abhijit
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-02-28 08:12:28 | Re: jsonb and nested hstore |
Previous Message | Peter Geoghegan | 2014-02-28 08:03:48 | Re: jsonb and nested hstore |