Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-1416

Switch from character UUIDs/hashes to the UUID type and bytea for hashes

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDB 3.0.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      3
    • Sprint:
      PuppetDB 2015-04-22

      Description

      This looks to be a pretty easy change and could save on storage costs pretty significantly. UUIDs stored as strings are about 36 bytes, and are 16 bytes stored as the native type. Hashes are 40 bytes as characters, but only 20 has a bytea field.

      In the testing I did, it looks like you can just cast the UUID string as a uuid and it just does the right thing. For the bytea field there a nice hexadecimal shorthand, just prefix the hash string with a \x and Postgres interprets it as a binary hexadecimal string.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                ryan.senior Ryan Senior
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: