Re: Sequence Access Method WIP
От | Petr Jelinek |
---|---|
Тема | Re: Sequence Access Method WIP |
Дата | |
Msg-id | 56DA5BF4.7040503@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: Sequence Access Method WIP (Alexander Korotkov <a.korotkov@postgrespro.ru>) |
Ответы |
Re: Sequence Access Method WIP
Re: Sequence Access Method WIP |
Список | pgsql-hackers |
On 16/02/16 13:58, Alexander Korotkov wrote: > > I've changed syntax of CREATE ACCESS METHOD syntax in the thread about > index access method extendability. > Now it is "CREATE ACCESS METHOD name TYPE INDEX HANDLER handler;". New > column amtype of pg_am stores access method type. > http://www.postgresql.org/message-id/CAPpHfdu9gLN7kuicweGsp50CaAMWx8Q-JWzbPehc92rvFHzkeg@mail.gmail.com > It could be easily extended to "CREATE ACCESS METHOD name TYPE SEQUENCE > HANDLER handler;". > Yes I've seen and I will send a review within couple of days. But first here is updated patch for sequence access methods. I went with the previously discussed custom type as this gives us proper control over the width of the state and making sure that it's not gonna be toastable, etc and we need this as sequence is limited to single page. Attached are 3 separate files. The first one (0001-create-am) is mainly separate for the reason that there is some overlap with Alexander's index access methods patch, so I extracted common code into separate patch as it will make it easier to merge in case we are lucky enough to get these patches in (but it's still based on Alexander's code). It provides infra for defining new access methods from SQL, although without the parser and without any actual access methods. The 0002-seqam provides the SQL interface and support for sequence access methods on top of the infra patch, and also provides all the sequence access methods infrastructure and abstraction and documentation. And finally the 0003-gapless-seq is example contrib module that implements dependably and transitionally safe gapless sequence access method. It's obviously slow as it has to do locking and basically serialize all the changes to sequence so only one transaction may use it at a time but it's truly gapless. It also serves as an example of use of the api and as a test. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: