puppetlabs/puppetdb — pull request #746 by kbarber (2013-11-05 22:43:09+00:00)
Title: WIP: PDB-67 Converting to using a bigint for catalogs table primary key

(not ready for merge, but feel free to review)

In preparation for differential updates to catalog related data (metadata and
edges) this patch converts the usage of the current catalog hash as primary
key over to using a bigint sequence instead. This allows us to update foreign
tables keys without having to also update the foreign key table.

This also has some index and table sized benefits, as the catalog hash is not
replicated multiple times but stored once. Instead the bigint is what is
replicated which is smaller (8 bits versus a 40 bit sha1 hash in this case).

Signed-off-by: Ken Barber