0

I've got an RDS Postgresql 12 instance that allocated 11,000,000 MB of io1 disk space, and there's 7,300,000 MB of Free Storage Space.

That means the database is only using 11TB - 7.3TB = 3.7TB of disk space, right? Or am I missing something?

Thus, I spun up a new instance that allocated 5TB of disk space, did a pg_dump and pg_restore.

During the pg_restore, Free Storage Space linearly dropped to zero, and then spiked up when AWS automatically added 2.5TB.

What's going on? Why is the new instance using more disk space?

And weirdly, free space has slowly increased, even though I haven't touched the system since the restore finished.

enter image description here

1 Answer 1

1

The extra space is being consumed by the WAL (transaction logs). When the data is being written via the restore you are writing to the write-ahead logs as well as the 1GB data file segments.

The space starts to increase as the WAL's are backed up and purged from the RDS storage by the RDS automatic backup feature.

HTH.

1
  • That’s depressing. I thought unneeded WALs were moved into the “backup space” S3 buckets where snapshots go.
    – RonJohn
    Nov 1, 2022 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.