Re: WIP: Rework access method interface - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: WIP: Rework access method interface
Date
Msg-id 55FEC1AB.8010406@2ndquadrant.com
Whole thread Raw
In response to Re: WIP: Rework access method interface  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
List pgsql-hackers
On 2015-09-20 16:17, Alexander Korotkov wrote:
> On Sun, Sep 20, 2015 at 5:02 PM, Petr Jelinek <petr@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: 9.3.9 and pg_multixact corruption
Next
From: Alexander Korotkov
Date:
Subject: Re: WIP: Rework access method interface