Re: after restore the size of the database is increased

From: Luca Ferrari <fluca1978(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: after restore the size of the database is increased
Date: 2019-07-16 06:19:02
Message-ID: CAKoxK+4K-ENucd3fZai57anzm8hKCwBODbwjcvod8j-W=MWS9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 15, 2019 at 7:07 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2019-07-16 06:27:03 Re: after restore the size of the database is increased
Previous Message Dirk Mika 2019-07-16 05:32:00 Re: How to run a task continuously in the background