Re: Sequence Access Method WIP

Petr Jelinek <petr@2ndquadrant.com>

From: Petr Jelinek <petr@2ndquadrant.com>
To: Heikki Linnakangas <hlinnakangas@vmware.com>, Simon Riggs <simon@2ndQuadrant.com>
Cc: Andres Freund <andres@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Alvaro Herrera <alvherre@2ndquadrant.com>
Date: 2015-01-23T00:34:35Z
Lists: pgsql-hackers

Attachments

On 22/01/15 17:02, Petr Jelinek wrote:
>
> The new version (the one that is not submitted yet) of gapless sequence
> is way more ugly and probably not best example either but does guarantee
> gaplessness (it stores the last value in it's own value table). So I am
> not sure if it should be included either...
>

Here it is as promised.

Notable changes:
- The gapless sequence rewritten to use the transactional storage as 
that's the only way to guarantee gaplessness between dump and restore.

- Custom columns are now stored in the catalog instead of generated by 
some special interface. This makes it possible to record dependencies on 
types and also seems in line with how other similar things are done.

- Removed couple of pallocs from the nextval codepath which improved 
performance considerably.

- Changed how the ALTER SEQUENCE ... USING behaves - when RESET WITH 
value is specified the new sequenceAM will use that one for starting, if 
it's not specified the nextval from original sequenceAM will be used as 
RESET value. In general handling of the RESET parameter is left to the AMs.

- Unified the reloptions for index and sequences into single function.

- Re-added setval3 for compatibility reasons - it only works on local 
sequences, otherwise it throws error.

- Made the 'local' default value for the GUC instead of special handling 
of the empty string.


Notable missing things:
- Docs for pg_seqam.

- pg_dump support for pg_seqam. It's embarrassing but I didn't think 
about this until Robert mentioned it, I am apparently too used to handle 
these things using extensions.


-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

Commits

  1. Add missing gss option to msvc config template