Sebastian
Sebastian

Reputation: 967

Error message: "PostgreSQL said: could not write block 119518 of temporary file: No space left on device" PostgreSQL

I have a query that, intuitively, should work just fine. But, almost immediately after executing, I am served with this error message:

ERROR:  could not write block 119518 of temporary file: No space left on device
Query failed
PostgreSQL said: could not write block 119518 of temporary file: No space left on device

I have approximately 4.5GB in free storage space.

I've tried whittling down the memory usage by replacing each of the CTEs with materialized views in the hope that would reduce the need for processing power.

Additionally. I've taken these steps --

--I boosted our AWS instance to the memory-optimized db.r4.16xlarge.

--I ran analyze verbose and vacuum full analyze

--I've stopped all other processes

The query does some small processing in two CTEs and then joins a table (roughly 20M rows) with a smaller lookup table (roughly 500K rows).

Upvotes: 3

Views: 4510

Answers (1)

Sebastian
Sebastian

Reputation: 967

Just in case someone else runs into this, I found out the answer. And, it was really simple: just go into the RDS admin panel and increase allocated storage.

Upvotes: 3

Related Questions