# How We Solved a Storage Problem in PostgreSQL Without Adding a Single Byte of Storage

DevFeed: [How We Solved a Storage Problem in PostgreSQL Without Adding a Single Byte of Storage](<https://devfeed.tech/articles/how-we-solved-a-storage-problem-in-postgresql-without-adding-a-single-byte-of-storage-33914.md>)

Original publisher: [Read original article](<https://hakibenita.com/how-we-solved-a-storage-problem-in-postgre-sql-without-adding-a-single-bytes-of-storage>)

Author: Haki Benita

Published: 2018-12-21T22:00:00Z

Content type: tutorial

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [etl](<https://devfeed.tech/topics/etl.md>), [Database](<https://devfeed.tech/topics/database.md>), [hash](<https://devfeed.tech/topics/hash.md>), [Sorting](<https://devfeed.tech/topics/sorting.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [disk-space](<https://devfeed.tech/tags/disk-space.md>), [dump](<https://devfeed.tech/tags/dump.md>), [etl](<https://devfeed.tech/tags/etl.md>), [hash](<https://devfeed.tech/tags/hash.md>), [performance](<https://devfeed.tech/tags/performance.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [query](<https://devfeed.tech/tags/query.md>), [sorting](<https://devfeed.tech/tags/sorting.md>), [sql](<https://devfeed.tech/tags/sql.md>), [storage](<https://devfeed.tech/tags/storage.md>)

## AI overview

This article explains how an ETL task for removing duplicate binary records in PostgreSQL caused increasing temporary disk-space usage. The author reduced the sorting key by hashing the binary value with md5, lowering additional disk usage from about 30 MB to about 4 MB without adding storage.

## Source excerpt

A while back we started getting alerts in the middle of the night on low disk space. A quick investigation led us to one of our ETL tasks. Every night the task was fired to eliminate duplicate dumps, and free up some space. This is a short story about how we found our silver bullet and solved the issue without adding a single byte of storage.