Re: WIP: Rework access method interface

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: WIP: Rework access method interface
Date: 2015-09-20 14:24:43
Message-ID: 55FEC1AB.8010406@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-09-20 16:17, Alexander Korotkov wrote:
> On Sun, Sep 20, 2015 at 5:02 PM, Petr Jelinek <petr(at)2ndquadrant(dot)com
>
> Hmm, we might want these functons in any case (although I think just
> one function which would return all am params would be better).
>
> But why is it not evident? We do the validations in regression
> tests, even if we just copy those then it's enough for a start
>
>
> The reason is that those validations were used only in regression tests
> yet. It wasn't used for user-defined operator classes. User might define
> invalid opclass and then alter it to valid. Or user might upgrade
> opclass in two steps where intermediate step is invalid. This is why I
> think validating opclasses in CREATE/ALTER command is not evident since
> it changes user visible behavior and compatibility.
> Simultaneously, implementing new API function just for regression tests
> doesn't seem to worth it for me.
>

I think it's ok to not do automatic validation during CREATE/ALTER just
yet. And I also think it's much worse to implement a SQL API which
exposes internals just for regression tests than having a C API just for
regression tests. The reason for moving AM to C API was to have less of
the internals exposed at SQL level afaik.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2015-09-20 14:26:20 Re: WIP: Rework access method interface
Previous Message Christoph Berg 2015-09-20 14:23:05 Re: 9.3.9 and pg_multixact corruption