public inbox for [email protected]
help / color / mirror / Atom feedDisk is filling up with large files. How can I clean?
4+ messages / 4 participants
[nested] [flat]
* Disk is filling up with large files. How can I clean?
@ 2024-10-08 11:06 Mikael Petterson <[email protected]>
2024-10-09 15:24 ` Re: Disk is filling up with large files. How can I clean? Adrian Klaver <[email protected]>
2024-10-09 16:01 ` Re: Disk is filling up with large files. How can I clean? Greg Sabino Mullane <[email protected]>
0 siblings, 2 replies; 4+ messages in thread
From: Mikael Petterson @ 2024-10-08 11:06 UTC (permalink / raw)
To: [email protected] <[email protected]>
Hi,
I find our disk is filling up.
sudo find /var/lib -type f -size +100M -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
/var/lib/rpm/Packages: 278M
/var/lib/pgsql/12/data/base/16384/16583: 392M
/var/lib/pgsql/12/data/base/16384/16586: 1.0G
/var/lib/pgsql/12/data/base/16384/16588: 173M
/var/lib/pgsql/12/data/base/16384/16633: 106M
/var/lib/pgsql/12/data/base/16384/16644: 179M
/var/lib/pgsql/12/data/base/16384/16659: 1.0G
/var/lib/pgsql/12/data/base/16384/16662: 438M
/var/lib/pgsql/12/data/base/16384/16665: 1.0G
/var/lib/pgsql/12/data/base/16384/16667: 1.0G
/var/lib/pgsql/12/data/base/16384/16668: 1.0G
/var/lib/pgsql/12/data/base/16384/16780: 466M
/var/lib/pgsql/12/data/base/16384/16786: 182M
/var/lib/pgsql/12/data/base/16384/16788: 163M
/var/lib/pgsql/12/data/base/16384/16789: 315M
/var/lib/pgsql/12/data/base/16384/16790: 126M
/var/lib/pgsql/12/data/base/16384/16665.2: 403M
/var/lib/pgsql/12/data/base/16384/16586.7: 1.0G
/var/lib/pgsql/12/data/base/16384/16586.6: 1.0G
/var/lib/pgsql/12/data/base/16384/16586.9: 1.0G
/var/lib/pgsql/12/data/base/16384/16586.8: 1.0G
/var/lib/pgsql/12/data/base/16384/16659.6: 1.0G
/var/lib/pgsql/12/data/base/16384/16659.4: 1.0G
/var/lib/pgsql/12/data/base/16384/16659.5: 1.0G
/var/lib/pgsql/12/data/base/16384/16668.3: 586M
/var/lib/pgsql/12/data/base/16384/16586.10: 458M
/var/lib/pgsql/12/data/base/16384/16659.1: 1.0G
/var/lib/pgsql/12/data/base/16384/16586.2: 1.0G
/var/lib/pgsql/12/data/base/16384/16659.2: 1.0G
/var/lib/pgsql/12/data/base/16384/16668.1: 1.0G
/var/lib/pgsql/12/data/base/16384/16586.3: 1.0G
/var/lib/pgsql/12/data/base/16384/16659.3: 1.0G
/var/lib/pgsql/12/data/base/16384/16586.4: 1.0G
/var/lib/pgsql/12/data/base/16384/16665.1: 1.0G
/var/lib/pgsql/12/data/base/16384/16586.5: 1.0G
/var/lib/pgsql/12/data/base/16384/16586.1: 1.0G
/var/lib/pgsql/12/data/base/16384/16668.2: 1.0G
/var/lib/pgsql/12/data/base/16384/16667.1: 741M
/var/lib/pgsql/12/data/base/16384/4652676: 502M
/var/lib/pgsql/12/data/base/16384/4652688: 155M
How can I clean up?
What can I do to clean up. We are using pgsql 12.
Br,
//Mikael
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Disk is filling up with large files. How can I clean?
2024-10-08 11:06 Disk is filling up with large files. How can I clean? Mikael Petterson <[email protected]>
@ 2024-10-09 15:24 ` Adrian Klaver <[email protected]>
1 sibling, 0 replies; 4+ messages in thread
From: Adrian Klaver @ 2024-10-09 15:24 UTC (permalink / raw)
To: Mikael Petterson <[email protected]>; [email protected] <[email protected]>
On 10/8/24 04:06, Mikael Petterson wrote:
> Hi,
> I find our disk is filling up.
Query the pg_stat_activity view:
https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW
and look for rows that have with state showing 'idle in transaction'.
Report back what you find.
You should also check out this post:
https://www.cybertec-postgresql.com/en/reasons-why-vacuum-wont-remove-dead-rows/
> What can I do to clean up. We are using pgsql 12.
> Br,
> //Mikael
>
>
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Disk is filling up with large files. How can I clean?
2024-10-08 11:06 Disk is filling up with large files. How can I clean? Mikael Petterson <[email protected]>
@ 2024-10-09 16:01 ` Greg Sabino Mullane <[email protected]>
2024-10-09 16:45 ` Re: Disk is filling up with large files. How can I clean? Sergey Fukanchik <[email protected]>
1 sibling, 1 reply; 4+ messages in thread
From: Greg Sabino Mullane @ 2024-10-09 16:01 UTC (permalink / raw)
To: Mikael Petterson <[email protected]>; +Cc: [email protected] <[email protected]>
On Wed, Oct 9, 2024 at 4:10 AM Mikael Petterson <[email protected]>
wrote:
> Hi,
>
> I find our disk is filling up.
>
> sudo find /var/lib -type f -size +100M -exec ls -lh {} \; | awk '{ print
> $9 ": " $5 }'
>
...
Those files only add up to about 30GB. That's pretty small these days :
time for a bigger disk? Or perhaps the space is elsewhere: probably want to
do something like
sudo find / -xdev -maxdepth 2 -exec du -sh {} \; | grep -E 'G|M' | sort -g
Cheers,
Greg
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Disk is filling up with large files. How can I clean?
2024-10-08 11:06 Disk is filling up with large files. How can I clean? Mikael Petterson <[email protected]>
2024-10-09 16:01 ` Re: Disk is filling up with large files. How can I clean? Greg Sabino Mullane <[email protected]>
@ 2024-10-09 16:45 ` Sergey Fukanchik <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Sergey Fukanchik @ 2024-10-09 16:45 UTC (permalink / raw)
To: [email protected] <[email protected]>
Another possibility is orphaned files.
See https://www.dbi-services.com/blog/can-there-be-orphaned-data-files-in-postgresql/
and https://github.com/bdrouvot/pg_orphaned
--
Sergey
On Wed, 9 Oct 2024 at 19:02, Greg Sabino Mullane <[email protected]> wrote:
>
> On Wed, Oct 9, 2024 at 4:10 AM Mikael Petterson <[email protected]> wrote:
>>
>> Hi,
>>
>> I find our disk is filling up.
>>
>> sudo find /var/lib -type f -size +100M -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
>
> ...
>
> Those files only add up to about 30GB. That's pretty small these days : time for a bigger disk? Or perhaps the space is elsewhere: probably want to do something like
> sudo find / -xdev -maxdepth 2 -exec du -sh {} \; | grep -E 'G|M' | sort -g
>
> Cheers,
> Greg
>
--
Sergey
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-10-09 16:45 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-10-08 11:06 Disk is filling up with large files. How can I clean? Mikael Petterson <[email protected]>
2024-10-09 15:24 ` Adrian Klaver <[email protected]>
2024-10-09 16:01 ` Greg Sabino Mullane <[email protected]>
2024-10-09 16:45 ` Sergey Fukanchik <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox