Embed Notice
HTML Code
Corresponding Notice
- Embed this noticeYou can vacuum full, but you need enough space for the rebuilt db. That'll take a while given the size of your database.
You may be able to partition the tables based on date and then drop the partitions you don't want. That should be nearly instant. I wouldn't try this without a backup or without knowing exactly what you're doing. Often when I'm planning on doing something I'm not sure of in a live environment, I'll set up a test environment on a separate system so I fuck that up trying to figure out the correct process instead of the live server.