Re: BUG #17449: Disk space not released - Mailing list pgsql-bugs

From Jeff Janes
Subject Re: BUG #17449: Disk space not released
Date
Msg-id CAMkU=1zJeNmHL=p3iYq64HTn9TuhmZuGB+EmVf7f7D5qPTjL2Q@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17449: Disk space not released  (Giorgio Saviane <gsaviane@gmail.com>)
Responses Re: BUG #17449: Disk space not released
List pgsql-bugs


On Mon, May 30, 2022, 7:40 AM Giorgio Saviane <gsaviane@gmail.com> wrote:
>>>
>>> > Despite any attempt
>>> > of full vacuum the discrepancy remained the same. I suspect that Postgres
>>> > started leaking disk space. I could see many 1Gb files with a timestamp of
>>> > two months back in time in the postgres data folder.
>
>
> If the database suffers a crash (or immediate shutdown) in the middle of something like VACUUM FULL or CLUSTER, it might leave orphaned in-process files such as the ones you describe behind and have no way to know to clean them up.  The knowledge about what it was working on just before the crash was lost in the crash.
>
> Files not touched in 2 months and also not referenced in pg_class.relfilenode are almost certainly such orphaned files and could, with extreme nervousness, be cleaned up by hand.  Especially if the human-readable log files support a crash having happened at that time.

That was not the case. The server has been running seamlessly since I
rebuilt the master.

But as i understand it, you rebuilt the master as a response to the problem, so the time period in question is before the rebuild, not after.

Cheers,

Jeff

pgsql-bugs by date:

Previous
From: Christoph Berg
Date:
Subject: Re: BUG #17504: psql --single-transaction -vON_ERROR_STOP=1 still commits after client-side error
Next
From: Fabien COELHO
Date:
Subject: Re: psql 15beta1 does not print notices on the console until transaction completes