Re: Postgres Database Disk Usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

We've got postgres 9.6.11 until december 7th and sometime we have corrupt data or older files not deleted.

We have found it Two times until 9.6.11.

We keep cool by restoring data in another base an delete the bigger one.

You can do this to know how cost your data :

SELECT pg_size_pretty(sum(pg_table_size(oid))) FROM pg_class;

if your directory is bigger there's a little probleme.

Yann Convers
Gestionnaire de l'infrastructure, des référentiels et des outils

DREAL Auvergne-Rhône-Alpes

Service Connaissance, Information, Développement Durable, Autorité Environnementale - Pole Système d Information Géographique
Tél : 04 26 28 67 89
courriel : yann.convers@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
adresse de la boite d’unité : boite unité

Pour toute commande interne de prestations, merci d utilisez le formulaire suivant : http://postgis-aura.projets.appli.i2/projects/demandes-de-prestations/issues/new

Adresse postale : DREAL Auvergne-Rhône-Alpes, CIDDAE - SIG 69453 LYON CEDEX 06 Adresse physique : 5 place Jules Ferry (immeuble Lugdunum - métro Brotteaux) - 69006 Lyon Standard : 04 26 28 60 00 Liens :Site Intranet  Site Internet

Le 08/02/2019 à 16:47, > Jeremiah Bauer (par Internet, dépôt pgsql-admin-owner+m63745-121696@xxxxxxxxxxxxxxxxxxxx) a écrit :
Hello,

We have a development database that reports a larger size than the sum of it's relations and I was hoping someone had some insight into this issue.  The consumed space is reflected in the size of the data directories PostgreSQL is maintaining on disk, so it's just not a reported size issue.

This is the version of Postgres we are using:

FVDM=# select version();
                                                  version                                                  
-----------------------------------------------------------------------------------------------------------
 PostgreSQL 9.6.11 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23), 64-bit

pg_database_size reports this size:

    name    |  owner   |  size  
------------+----------+---------
 FVDM       | postgres | 43 GB

Running a query to report the total relation size of each schema results in this:

     schemaname     | pg_size_pretty
--------------------+----------------
 information_schema | 152 kB
 pg_catalog         | 7880 kB
 public             | 52 MB
 mart               | 439 MB
(4 rows)

The total size of the relations is less than a gigabyte, but the database is 43GB in size.  I've checked each table and there aren't any added indexes, so I'm very confused.

We've run vacuum full and reindex on the database with no reduction in size and a vacuum analyze verbose reports no recoverable rows.  I cloned the machine for troubleshooting and even attempted truncating every table in the database to see if that remedied the issue.  The only thing that has reclaimed the space is dropping the database and restoring from backup.

What is using the space and how do we reclaim it?  

Any help or insight would be greatly appreciated, I'm at a loss as to what is consuming this space.

--


Jeremiah

CONFIDENTIALITY NOTICE: The information contained in this email (and any attachments) is privileged and confidential and protected from disclosure. If you are not the intended recipient of this email or the attachments, be aware that any disclosure, copying, distribution or use of this email or any attachment is strictly prohibited and you should not read the message or read or open any attachment. If you have received this email by mistake, please immediately notify the sender and delete it permanently from your system. Agri Stats, Inc. and its subsidiaries will not be held liable to any person or entity resulting from the unintended or unauthorized use of any information contained in this email.


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux