pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Karlsson <andreas@proxel.se>
To: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: Re: Indexes on UUID - Fragmentation Issue
Date: Mon, 29 Oct 2018 15:52:21 +0100
Message-ID: <2d34b6d8-a22f-e5de-1cbe-f92012006de9@proxel.se> (raw)
In-Reply-To: <CAFowjW1J7KMjPfQY0ST94V0t=rcjz13HkjMuqJVP_Lk6Zn8Cag@mail.gmail.com>
References: <CAFowjW1J7KMjPfQY0ST94V0t=rcjz13HkjMuqJVP_Lk6Zn8Cag@mail.gmail.com>

On 10/29/2018 02:29 PM, Uday Bhaskar V wrote:> I have
> created C function which can generate a sequential UUID, but I am not 
> sure how best I can use that in postgres.
> 
> I would really like to contribute to Postgres, If I can. Please let me 
> know your thoughts or plans regarding UUID generation.

How is it implemented? I can personally see two ways of generating 
sequential UUID:s. Either you use something like PostgreSQL's sequences 
or you can implement something based on the system time plus some few 
random bits which means they will be mostly sequential.

It could be worth checking on the hackers mailing list if there is any 
interest in this feature, but if it works like a sequence it should also 
probably be a sequence if it is ever going to be accepted into the core.

For your own use I recommend doing like Merlin suggested and write an 
extension. As long as you know a bit of C they are easy to write.

Andreas




view thread (5+ messages)  latest in thread

Message-ID: <2d34b6d8-a22f-e5de-1cbe-f92012006de9@proxel.se>
Permalink:  ../2d34b6d8-a22f-e5de-1cbe-f92012006de9@proxel.se/
Also on:    postgresql.org/message-id/2d34b6d8-a22f-e5de-1cbe-f92012006de9@proxel.se

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: andreas@proxel.se, pgsql-performance@lists.postgresql.org
  Subject: Re: Indexes on UUID - Fragmentation Issue
  In-Reply-To: <2d34b6d8-a22f-e5de-1cbe-f92012006de9@proxel.se>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox