6 ms·
I always thought that limiting by the "size" of the database in megabytes was unintuitive with the 5MB/25MB plans (how many bytes are in a row?)- pricing per-ro
by stevencorona 14y ago
I always thought that limiting by the "size" of the database in megabytes was unintuitive with the 5MB/25MB plans (how many bytes are in a row?)- pricing per-row is much more developer friendly.
I wonder how they'll handle someone doing something awful like storing images or blobs in the database, though.
- mattsoldo 14y agoWe've generally found that this sort abuse rarely happens. Generally developers utilize our services as they are intended. And it is much easier to release new services and watch for abuse than to pro-actively restrict them before-hand. There is nothing wrong with storing blobs in the database - it is one of the data types. But a database is not a replacement for AWS S3 either. If we did find someone abusively using the database - especially if it was affecting the overall quality of service - we would reach out to them directly to address it.
- stonemetal 14y agoWhile I agree that the old plans were unintuitive, the new plan seems somewhat abuse able. How big can a blob be in PG?
- fusiongyro 14y ago1 GB. You can see the other limits here: http://www.postgresql.org/about/ http://www.postgresql.org/about/
- einhverfr 14y agoactually a lob can go up to 2GB. Byteas are limited to 1GB. I store images and other binary data in the db all the time, when this is closely associated with data in the db and needs to be maintained together. Usually these files are store once, retrieve seldom. However for practical purposes I would not recommend going above a few megs on a bytea field. lobs are easier because you can seek in them, but access will never be as fast as it would be directly from the filesystem.
- bartonfink 14y agoA row can be 400GB, so both size and row metrics make sense. I think that the size metric is likely helped tremendously by sane alerts. http://wiki.postgresql.org/wiki/FAQ#What_is_the_maximum_size_for_a_row.2C_a_table.2C_and_a_database.3F http://wiki.postgresql.org/wiki/FAQ#What_is_the_maximum_size...
- masklinn 14y agohttp://www.postgresql.org/about/ http://www.postgresql.org/about/ even quotes 1.6TB/row. Guessing it's under the two maximums of 1600 max columns, 1GB max/field (though they may not actually be compatible)
- timaelliott 14y agoI disagree. By restricting the number of rows I think you're just going to end up with folks creating sloppy schemas specifically to avoid going over the limit. post.categories (varchar) = "1,51,78,84,100" and other wonderful non-normalized approaches.
- travisp 14y agoMake a horrible schema just to avoid ten dollars a month? Surely the time of most developers is worth more than that.
- indiecore 14y agoGive a person an limit and he will try to overcome it no matter how silly it is.
- pvh 14y agoHm. If you must do that, remember Postgres is guilt-free-SQL, so don't use a varchar, use the array type. http://www.postgresql.org/docs/9.1/static/arrays.html http://www.postgresql.org/docs/9.1/static/arrays.html
- willlll 14y agoor hstore https://postgres.heroku.com/blog/past/2012/3/14/introducing_keyvalue_data_storage_in_heroku_postgres/ https://postgres.heroku.com/blog/past/2012/3/14/introducing_...
- timaelliott 14y agoI like that you guys pointed out more efficient ways to do stupid things :)
- pvh 14y agoWell, if the time it takes you to contort your application to work around our row limits is worth less to you than $9/mo, you're probably in need of both technical and financial advice.
- indiecore 14y agoI actually agree completely. I was looking at hosting on Heroku and I ended up just figuring out how big the biggest possible row would be for each table and basically enforcing a row limit by myself. Having a predefined row limit saves me from re-computing this number when I change my schema.