WIP: Rework access method interface

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема WIP: Rework access method interface
Дата
Msg-id CAPpHfdtLiSXmXk2b4tW+4+No_1-T0raO5fOYszhO6+Sn2Om+xw@mail.gmail.com
обсуждение исходный текст
Ответы Re: WIP: Rework access method interface
Список pgsql-hackers
Hacker,

some time before I proposed patches implementing CREATE ACCESS METHOD.
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.

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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Precedence of standard comparison operators
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Precedence of standard comparison operators