an hour ago
My Postgres volume (postgres-volume, 500 MB, project CRM-Victoria, us-west2) shows a “High Volume Usage – 78%” warning (~390 MB). Inside the container, df -h /var/lib/postgresql/data reports 165M used of 434M (39%), and du confirms pg_wal ≈129M + base ≈35M.
The difference seems to come from WAL churn (PITR with archive_timeout=60s recycles a 16 MB segment every minute), so freed blocks are never discarded. Running fstrim -v /var/lib/postgresql/data returns FITRIM ioctl failed: Operation not permitted.
Could you trim/reclaim the volume on your side, or enable discard for it? I’d rather not upgrade the volume, since the real usage is low.
1 Reply
an hour ago
The volume usage figure is the storage our side has allocated for the volume, not the live data your filesystem reports, so it is expected to sit above df and du. It currently reads about 389 MB. Blocks freed by WAL recycling are only handed back once they are discarded, and storage is allocated in 16 KB blocks while ext4 frees space in 4 KB blocks. Partially freed blocks can't be returned, so the figure settles above your df number rather than matching it.
fstrim failing with "Operation not permitted" is expected, because containers don't have the permission it needs. Volumes are already mounted with continuous discard. We don't run a manual trim or reclaim on individual volumes, and nothing is wrong with your data or your Postgres setup.
Volume storage is billed on this usage figure at $0.15/GB-month, not on the 500 MB provisioned size. At roughly 0.39 GB, that comes to about $0.06 a month, so the gap over your df figure costs only a few cents.
Status changed to Awaiting User Response Railway • about 1 hour ago