Re: Sequence Access Method WIP - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: Sequence Access Method WIP
Date
Msg-id CALLjQTQ8cf75FskqfGaSR5sGzbVNNUEPnKfZg_Gikw1PgNfDoA@mail.gmail.com
Whole thread Raw
In response to Re: Sequence Access Method WIP  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Sequence Access Method WIP  (Robert Haas <robertmhaas@gmail.com>)
Re: Sequence Access Method WIP  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
List pgsql-hackers
On 29 January 2016 at 23:59, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Jan 29, 2016 at 5:24 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
>>> On Fri, Jan 29, 2016 at 6:36 PM, Alvaro Herrera <alvherre@2ndquadrant.com>
>>> wrote:
>>>> I'm thinking we'd do CREATE ACCESS METHOD foobar TYPE INDEX or something
>>>> like that.
>>
>>> I would prefer "CREATE {INDEX | SEQUENCE | ... } ACCESS METHOD name HANDLER
>>> handler;", but I don't insist.
>>
>> I think that Alvaro's idea is less likely to risk future grammar
>> conflicts.  We've had enough headaches from CREATE [ UNIQUE ] INDEX
>> [ CONCURRENTLY ] to make me really wary of variables in the statement-name
>> part of the syntax.
>
> Strong +1.  If we put the type of access method immediately after
> CREATE, I'm almost positive we'll regret it for exactly that reason.
>

Just as a note, CREATE SEQUENCE ACCESS METHOD already causes grammar
conflict now, that's why my proposal was different, I didn't want to
add more keywords. I think Alvaro's proposal is fine as well.

The other point is that we are creating ACCESS METHOD object so that's
what should be after CREATE.

In any case this is slightly premature IMHO as DDL is somewhat unless
until we have sequence access methods implementation we can agree on,
or the generic WAL logging so that custom indexes can be crash safe.

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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Fwd: Core dump with nested CREATE TEMP TABLE
Next
From: Robert Haas
Date:
Subject: Re: Template for commit messages