Re: Sequence Access Method WIP
Petr Jelinek <petr@2ndquadrant.com>
From: Petr Jelinek <petr@2ndquadrant.com>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
Craig Ringer <craig@2ndquadrant.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2016-03-05T04:09:24Z
Lists: pgsql-hackers
Attachments
- 0001-create-am-infra-2015-03-05.patch (application/x-patch) patch 0001
- 0002-seqam-2015-03-05.patch (application/x-patch) patch 0002
- 0003-gapless-seq-2015-03-05.patch (application/x-patch) patch 0003
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
Commits
-
Add missing gss option to msvc config template
- 3063e7a84026 9.6.0 cited