Re: Global Sequences - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Global Sequences
Date
Msg-id 25319.1350396927@sss.pgh.pa.us
Whole thread Raw
In response to Global Sequences  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Global Sequences  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> So, proposal is to allow nextval() allocation to access a plugin,
> rather than simply write a WAL record and increment. If the plugin is
> loaded all sequences call it (not OIDs).

I think this is a fundamentally wrong way to go about doing what you
want to do.  It presumes that DDL-level manipulation of global sequences
is exactly like local sequences; an assumption that is obviously false.
What you really want is something vaguely like nextval but applied to
a distinct type of object.  That is, I think we first need a different
kind of object called a "global sequence" with its own DDL operations.

The nearby thread about "message queue" objects seems rather closely
related.  Perhaps it would be fruitful to think about the commonalities
involved in two (or more?) new relkinds for global objects.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: tuplesort memory usage: grow_memtuples
Next
From: Jan Wieck
Date:
Subject: Re: [RFC][PATCH] wal decoding, attempt #2 - Design Documents (really attached)