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