Fabien COELHO <coelho@cri.ensmp.fr> writes:
> The actual simple fix would be that user ids should NOT be reused by
> default. The problem is that I don't think the already used userids are
> kept anywhere, even as a sequence.
In the last discussion of this issue, I think we had agreed in principle
that it'd be a good idea to use a cluster-wide sequence generator to
assign default user and group ids. Nobody's got round to making it
happen though. While I don't see any fundamental technical reason why a
sequence object couldn't be relisshared, there's no way to create such a
sequence in the present code --- bringing the thing into being during
initdb would certainly be the major bit of work needed to make it
happen.
(I have some vague recollection that we discussed how to do that during
the last go-round --- if you want to work on this, it'd be a good idea
to look in the archives first.)
regards, tom lane