Why did stick usage INCREASE after deleting 200K rows?
mfvas
PROOP

a year ago

I just deleted 200K rows in a Postgres table with 1.4M rows, so around 20%, and all the related rows in other tables.

This increased volume usage, according to your dashboard, from ~3.77 GB to 4.71 GB.

What am I missing?

Solved

8 Replies

jake
EMPLOYEE

a year ago

You'll want to run the VACUUM command on postgres to reclaim the space


Status changed to Awaiting User Response Railway 11 months ago


mfvas
PROOP

a year ago

Thanks, Jake! I didn't know that. However, when doing so, I get this error: "could not resize shared memory segment "/PostgreSQL.2527481070" to 66454816 bytes: No space left on device"

I understand that this has something to do with shared memory, but this is currently above my pay grade. Can you point me in the right direction for what to look into?


Status changed to Awaiting Railway Response Railway 11 months ago


You will need to increase the size of the volume in this case so you can reclaim the space.

Keep in mind, you won’t be charged if you increase the disk size as you are only billed for the disk you use.


Status changed to Awaiting User Response Railway 11 months ago


angelo-railway

You will need to increase the size of the volume in this case so you can reclaim the space.Keep in mind, you won’t be charged if you increase the disk size as you are only billed for the disk you use.

mfvas
PROOP

a year ago

Thank you, Angelo. But isn't it a little weird if I have to increase the volume to vacuum a 50GB disk that only uses 5GB?

(I don't know anything about this, so genuine question, trying to understand this better.)


Status changed to Awaiting Railway Response Railway 11 months ago


Status changed to Awaiting User Response jake 11 months ago


mfvas
PROOP

a year ago

I don't know why Jake changed the status. But I would still appreciate a reply here to understand this better raising_hand_man emoji


Status changed to Awaiting Railway Response Railway 11 months ago


itsrems
EMPLOYEE

a year ago

You may need to bump RAILWAY_SHM_SIZE_BYTES - postgres on containers can be a bit of a pain sometimes.

Try RAILWAY_SHM_SIZE_BYTES=134217728


Status changed to Awaiting User Response Railway 11 months ago


mfvas
PROOP

10 months ago

I tried setting RAILWAY_SHM_SIZE_BYTES=134217728 and was able to VACUUM. But:

  1. Disk space didn't decrease, and

  2. memory usage spiked from 1-2 GB to +10 GB even though the server was relatively idle. It decrease back to "normal" when I removed the env. variable again.

Isn't an 8GB spike weird?

Attachments


Status changed to Awaiting Railway Response Railway 10 months ago


brody
EMPLOYEE

10 months ago

I'm sorry but we cannot continue to provide assistance here, given the fact that Postgres database is unmanaged and we cannot provide support for 3rd party software.

Perhaps Postgres-centric forums would be able to answer your PostgreSQL-specific questions.


Status changed to Awaiting User Response Railway 10 months ago


Railway
BOT

6 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 6 months ago


Loading...