Re: Pluggable storage

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Pluggable storage
Date: 2017-09-27 12:05:45
Message-ID: CAPpHfdvvir+vLmLGrT5JZ3EV8_p3r4=b7rG-484AuPVisUkCeg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Thank you for review on this subject. I think it's extremely important for
PostgreSQL to eventually get pluggable storage API.
In general I agree with all your points. But I'd like to make couple of
comments.

On Tue, Aug 15, 2017 at 9:53 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:

> - I don't think we should introduce this without a user besides
> heapam. The likelihood that API will be usable by anything else
> without a testcase seems fairly remote. I think some src/test/modules
> type implementation of a per-session, in-memory storage - relatively
> easy to implement - or such is necessary.
>

+1 for having a user before committing API. However, I'd like to note that
sample storage implementation should do something really different from out
current heap. In particular, if per-session, in-memory storage would be
just another way to keep heap in local buffers, it wouldn't be OK for me;
because such kind of storage could be achieved way more easier without so
complex API. But if per-session, in-memory storage would, for instance,
utilize different MVCC implementation, that would be very good sample of
storage API usage.

> - Minor: don't think the _function suffix for Storis necessary, just
> makes things long, and every member has it. Besides that, it's also
> easy to misunderstand - for a second I understood
> scan_getnext_function to be about getting the next function...
>

_function suffix looks long for me too. But we should look on this
question from uniformity point of view.
FdwRoutine, TsmRoutine, IndexAmRoutine use _function suffix. This is why I
think we should use _function suffix for StorageAmRoutine unless we're
going to change that for other *Routines too.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2017-09-27 12:08:22 Re: Pluggable storage
Previous Message tushar 2017-09-27 11:59:32 Re: Binary search in fmgr_isbuiltin() is a bottleneck.