2

does anyone know what this error is in relation to ? Is it in relation to the size of the RDS DB Instance or is it in relation to a temp tablespace ?

ERROR: could not write to hash-join temporary file: No space left on device;

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
TheManBehindTheMan
  • 31
  • 1
  • 3
  • 10
  • Check this article which lists a few troubleshooting steps: https://aws.amazon.com/premiumsupport/knowledge-center/diskfull-error-rds-postgresql/. – krishna_mee2004 Oct 31 '19 at 10:05
  • Thanks for that. It looks like the issue was actually caused by the RDS Instance running out of space. I enabled autoscaling for my RDS instance and didn't come across that error again. – TheManBehindTheMan Oct 31 '19 at 14:24

2 Answers2

0

For sort operations, local temp storage is used.

The local storage varies based on the size of the instance. In this case, enabling auto-scaling resolved the issue.

TheManBehindTheMan
  • 31
  • 1
  • 3
  • 10
0

According to this AWS article

All DB temporary files (for example, logs and temporary tables) are stored in the instance local storage. This includes sorting operations, hash tables, and grouping operations that are required by queries.

This leaves you with the following options:

  • edit your parameter group and increase maintenance_work_mem and work_mem to allocate more memory to the processes that are performing the operation.
  • increase the size of your Aurora instance so that the instance has more available local storage.

Enabling autoscaling and adding read replicas did not help in my case.

Community
  • 1
  • 1
edbighead
  • 5,607
  • 5
  • 29
  • 35