WIP: Rework access method interface

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: WIP: Rework access method interface
Date: 2015-08-09 21:56:27
Message-ID: CAPpHfdtLiSXmXk2b4tW+4+No_1-T0raO5fOYszhO6+Sn2Om+xw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hacker,

some time before I proposed patches implementing CREATE ACCESS METHOD.
http://www.postgresql.org/message-id/CAPpHfdsXwZmojm6Dx+TJnpYk27kT4o7Ri6X_4OSWcByu1Rm+VA@mail.gmail.com
As I get from comments to my patches and also from Tom's comment about AM
interface in tablesampling thread – AM interface needs reworking. And
AFAICS AM interface rework is essential to have CREATE ACCESS METHOD
command.
http://www.postgresql.org/message-id/5438.1436740611@sss.pgh.pa.us

This is why I'd like to show a WIP patch implementing AM interface rework.
Patch is quite dirty yet, but I think it illustrated the idea quite clear.
AM now have single parameter – handler function. This handler returns
pointer to AmRoutine which have the same data as pg_am had before. Thus,
API is organized very like FDW.

However, this patch appears to take more work than I expected. It have to
do many changes spread among many files. Also, it appears not so easy to
hide amsupport into AmRoutine, because it's needed for relcache. As a
temporary solution it's duplicated in RelationData.

What do you think about this approach of AM interface rework?

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

Attachment Content-Type Size
aminterface-1.patch application/octet-stream 197.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2015-08-09 22:07:55 Re: pgsql: Fix pg_dump to dump shell types.
Previous Message Tom Lane 2015-08-09 21:35:46 Re: Precedence of standard comparison operators