Re: Starting Postgres when there is no disk space - Mailing list pgsql-general

From Igal Sapir
Subject Re: Starting Postgres when there is no disk space
Date
Msg-id CA+zig08OJ9OCcVG2DFSH19q5q8CODvQwJBx+UQq3aN94kUmYUA@mail.gmail.com
Whole thread Raw
In response to Re: Starting Postgres when there is no disk space  (Michael Nolan <htfoot@gmail.com>)
List pgsql-general
Right.  I managed to start up Postgres by symlinking the following directories to a new mount:  pg_logical, pg_subtrans, pg_wal, pg_xact.

I then created a new tablespace on the new mount, set it to be the default tablespace, and moved some of the smaller (about 30GB) tables to it.  That allowed me to delete old data, do full vacuum, and move the data back to the original disk.

This is timeseries data and there is a daily process that deletes the old stuff, but vacuum full still fails to return the space to the OS.  Perhaps I will get better results with table partitioning, or with TimeScaleDB.

Thank you for your help,

Igal

On Wed, May 1, 2019 at 11:08 PM Michael Nolan <htfoot@gmail.com> wrote:


Assuming you get the database back online, I would suggest you put a procedure in place to monitor disk space and alert you when it starts to get low. 
--
Mike Nolan

pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Migrating an application with Oracle temporary tables
Next
From: Andrew Gierth
Date:
Subject: Re: Back Slash \ issue