Re: Sequence Access Method WIP - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Sequence Access Method WIP
Date
Msg-id CA+U5nMLBRDJRDj4=mrToqkoP_U=E7awfLiyRAX-5=zNWVheZSg@mail.gmail.com
Whole thread Raw
In response to Re: Sequence Access Method WIP  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Sequence Access Method WIP  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On 5 November 2014 17:32, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:

> Why does sequence_alloc need the current value? If it's a "remote" seqam,
> the current value is kept in the remote server, and the last value that was
> given to this PostgreSQL server is irrelevant.
>
> That irks me with this API. The method for acquiring a new value isn't fully
> abstracted behind the AM interface, as sequence.c still needs to track it
> itself. That's useful for the local AM, of course, and maybe some others,
> but for others it's totally useless.

Please bear in mind what seqam is for...

At present it's only use is to provide Global Sequences. There's a few
ways of doing that, but they all look sorta similar.

The only other use we thought of was shot down, so producing the
perfect API isn't likely to help anyone. It's really not worth the
effort to produce a better API.

BDR doesn't require Global Sequences, nor are Global Sequences
restricted in their use to just BDR - lots of cluster configurations
would want something like this.

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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add CREATE support to event triggers
Next
From: Robert Haas
Date:
Subject: Re: row_to_json bug with index only scans: empty keys!