Re: vacuum full come disco

From: Horacio Miranda <hmiranda(at)gmail(dot)com>
To: Mario González Troncoso <gonzalemario(at)gmail(dot)com>
Cc: Enrique Herrera Noya <enrique(dot)herreranoya(at)gmail(dot)com>, Ayuda <pgsql-es-ayuda(at)lists(dot)postgresql(dot)org>
Subject: Re: vacuum full come disco
Date: 2024-04-29 22:23:41
Message-ID: A81DB42A-A652-43DE-89FA-EEA7DE1F2740@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Si vas a borrar una tabla grande, no la borres, hazle un truncate. Esto libera el espacio y tiene otros beneficios.

https://gxara.medium.com/pros-cons-of-truncate-vs-delete-postgresql-68ecbc3c2505
Pros & Cons of TRUNCATE vs DELETE (PostgreSQL)
gxara.medium.com

> On 30/04/2024, at 9:29 AM, Mario González Troncoso <gonzalemario(at)gmail(dot)com> wrote:
>
> On Mon, 29 Apr 2024 at 17:21, Enrique Herrera Noya
> <enrique(dot)herreranoya(at)gmail(dot)com <mailto:enrique(dot)herreranoya(at)gmail(dot)com>> wrote:
>>
>>
>> en otro servidor con postgresql 10.23, me percate que despues de borrar
>> tablas que no usan los de producción de datos,
>>
>> no se habia efectuado un vacuum hace rato,
>>
>> lance un vacuum full verbose;
>>
>> y sigue comiendo disco, no se supone que debe liberar disco en ves de
>> ocupar mas disco
>>
>
> Por "comer disco" quieres decir que te reduce el espacio disponible
> verdad? Si es así, claro que devuelve el espacio marcado para
> reutilizar al sistema operativo pero después de terminar[1] "VACUUM
> FULL rewrites the entire contents of the table into a new disk file
> with no extra space, allowing unused space to be returned to the
> operating system". No estoy seguro si servirá hacer el VACUUM FULL
> tabla por tabla si tienes espacio limitado.
>
> [1] https://www.postgresql.org/docs/current/sql-vacuum.html
>
>> nota: son como 900 tablas .....
>>
>> originalmente la base pesaba 1.2T, ya esta ocupando 2.7T
>>
>>
>>
>> Enrique Herrera Noya
>> --
>> +56 992303151
>> Red Hat Certified Engineer RHCE Nº100223072 (RH6.0)
>> Red Hat Certified System Administrato RHCSA Nº100223072 (RH6.0)
>> Red Hat Certified Technician (RHCT) Nº605010753835478 (RH5.0)
>> Novell Certified Linux Professional CLP 10
>> Red Hat Delivery Specialist -Container Platform Application Deployment I
>> Red Hat Delivery Specialist - Container Platform Administration I
>> RED HAT SPECIALIST
>> How to Sell Red Hat OpenShift for Infrastructure
>> How to Sell Red Hat OpenShift for Developers
>> Red Hat Sales Engineer Specialist - Container Platform
>> Red Hat Sales Engineer Specialist – Automation
>>
>>
>>
>
>
> --
> https://www.linkedin.com/in/gonzalemario

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Enrique Herrera Noya 2024-04-30 01:24:41 Re: vacuum full come disco
Previous Message Mario González Troncoso 2024-04-29 21:29:57 Re: vacuum full come disco