pgsql: Teach pg_size_pretty and pg_size_bytes about petabytes

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Teach pg_size_pretty and pg_size_bytes about petabytes
Date: 2021-07-09 06:56:37
Message-ID: E1m1kRB-0004xl-KZ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Teach pg_size_pretty and pg_size_bytes about petabytes

There was talk about adding units all the way up to yottabytes but it
seems quite far-fetched that anyone would need those. Since such large
units are not exactly commonplace, it seems unlikely that having
pg_size_pretty outputting unit any larger than petabytes would actually be
helpful to anyone.

Since petabytes are on the horizon, let's just add those only. Maybe one
day we'll get to add additional units, but it will likely be a while
before we'll need to think beyond petabytes in regards to the size of a
database.

Author: David Christensen
Discussion: https://postgr.es/m/CAOxo6XKmHc_WZip-x5QwaOqFEiCq_SVD0B7sbTZQk+qqcn2qaw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ca2e4472ba7b6e5e8cd8955eacffb90e4d88d085

Modified Files
--------------
src/backend/utils/adt/dbsize.c | 3 +-
src/test/regress/expected/dbsize.out | 124 ++++++++++++++++++-----------------
src/test/regress/sql/dbsize.sql | 9 +--
3 files changed, 72 insertions(+), 64 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-07-09 15:02:54 pgsql: Reject cases where a query in WITH rewrites to just NOTIFY.
Previous Message Michael Paquier 2021-07-09 06:28:26 pgsql: Add forgotten LSN_FORMAT_ARGS() in xlogreader.c