Re: after restore the size of the database is increased - Mailing list pgsql-general

From Luca Ferrari
Subject Re: after restore the size of the database is increased
Date
Msg-id CAKoxK+4K-ENucd3fZai57anzm8hKCwBODbwjcvod8j-W=MWS9Q@mail.gmail.com
Whole thread Raw
In response to Re: after restore the size of the database is increased  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
On Mon, Jul 15, 2019 at 7:07 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> What does \l+ show?

The same as pg_size_pretty:

foo=# \l+
                                                               List of databases
   Name    |  Owner   | Encoding  | Collate | Ctype |   Access
privileges   |  Size   | Tablespace |                Description

-----------+----------+-----------+---------+-------+-----------------------+---------+------------+--------------------------------------------
 bar       | luca     | SQL_ASCII | C       | C     |
     | 2566 MB | pg_default |
 foo       | luca     | SQL_ASCII | C       | C     |
     | 2562 MB | pg_default |


foo=# SELECT pg_size_pretty( pg_database_size( 'foo' ) ) AS foo,
pg_size_pretty( pg_database_size( 'bar' ) ) AS bar;
-[ RECORD 1 ]
foo | 2562 MB
bar | 2566 MB

Luca



pgsql-general by date:

Previous
From: Dirk Mika
Date:
Subject: Re: How to run a task continuously in the background
Next
From: Luca Ferrari
Date:
Subject: Re: after restore the size of the database is increased