it’s Hugo! This week, Replit launched a new database… PostgreSQL! I love PostgreSQL, it’s easy to use, and also fun to work with. I’ve seen PostgreSQL before, and I think that it’s a really good database and that it’s worth it using!
For those who don’t know what PostgreSQL is, it’s a powerful, open-source object-relational database system that is widely used in web applications and other software development projects. Now you might be asking yourself, why use PostgreSQL on Replit? Well, here are some reasons :
- Seamless integration
- Fantastic Neon Documentation
- Connection pooling
- Compute lifecycle
If you don’t understand why the fifth point is a reason, let me explain! PostgreSQL is powered by Neon, and with fantastic documentation, you can perfectly know how to use it. Replit also has great documentation explaining how to use the database, which I will link at the end of this post!
Now, let’s talk about pricing! You can get access to PostgreSQL for the great price of 100 cycles per day ($1.00). Cycles can be purchased by clicking on the Power Up button. But you can also have cycles by doing some bounties or if someone tips you! You will be able to find some links to documentation articles on everything I mentioned here.
Documentation links :
Replit PostgreSQL Documentation: https://docs.replit.com/neon-database/intro
Replit Bounties Documentation: https://docs.replit.com/category/bounties
Replit Tipping Documentation: https://docs.replit.com/cycles/tipping
And that’s today’s update! I’m Hugo, also known as Hugoonreplit. You will now see my post on the updates channel.
You mean 100 cycles per day? That would be $365/yr which isn’t really a good price for a 10 GB database. Also, in the repl documentation it says that the database is only 2 GB, not 10 but still with the same price so I’m a bit confused about that.
Besides, you can find PostgreSQL databases elsewhere for much cheaper. Heroku has a similar 10 GB database plan for $84/yr ($7/mo). Some people might find this more convenient than a third-party database, but a 3 time increase in price for just convenience is a bit overboard in my opinion.
Yeah, 100 cycles per day!
Yeah. Also, why should I use PotsgreSQL for 1 dollar a day, when I can use Replit DB for free (or until they make you pay for that too). There’s also MongoDB and a whole ton of other databases I can use for more storage and no money paid. This update seems like a cash grab for Replit.
Well, it’s just people’s choice, personally I prefer using PostgreSQL!
btw hugo neon db’s free tier is what replit charges us for, and its actually free
I would use MongoDB which has a free tier at 10Gb shared also. Good for getting started and I do tend to prefer NoSQL anyhow.
Neon offers a much better database than what others offer. The basic DB from Heroku is $9/month and has shared CPU / RAM. MongoDB isn’t directly comparable since it’s a NoSQL database, but even still, their free tier also has shared CPU / RAM and only has 512 MB of storage.
The Replit Neon DB integration is usable in production with a dedicated core and 4 GB of RAM.
I am using MongoDB free with 10Gb … but yes it is a shared CPU/RAM which for development is ok (deployment not) and it is a NoSQL (which for me is an advantage )
Curious by dedicated core do you mean that it’s running on the Repl or that you have dedicated servers that hand out resources for dbs to users :)?
Also followup if the latter is the case what are the protections against users who buy up all the space on your server
…but isn’t the Neon database free and serverless if you get it from them? Besides, I doubt someone would need a more powerful machine to host a database of 10 GB, cause that isn’t much. If someone really needed something that could handle so much queries, they’d probably get a bigger database with it too. Just speaking for myself, though. As a student programmer, I haven’t really seen issues with the speed of free PostgreSQL services out there.
You’re more than welcome to use the Neon free tier while it’s available! We will probably offer some free or significantly cheaper option in the future. Neon’s free tier has less storage and a hard limit on the number of databases you can create, but if it suits your needs then by all means use it. IMO using the Replit PostgreSQL feature is a much better experience since everything is right there in the same workspace. Plus you can pay for it with cycles. We’re not really here to convince you to use one or the other – choose whichever one works better for you.
@RayhanADev The database is running on a separate server, not within the the repl. Replit DB doesn’t run on the repl either. Generally we try to keep things on the repl as light as possible so things don’t get in the way of your apps.
The Hacker plan doesn’t get any PostgresSQL usage? Not great.
Hacker plan real name is hacked.
It doesn’t sadly! @bardia, what do you think about this being a hacker plan benefit?
Good to hear! I’ve been running into storage issues (separate post) so good to know its not consuming in-Repl storage
I have some feedback to share regarding the What is PostgreSQL documentation that was created:
- In the Python section, the code seems to use node.js language to call the DB environment variable:
process.env.REPLIT_PG_DB_URL. A correct, pythonic way to get the env variable is
- By default, the Neon URL env variable is
DATABASE_URL. So, shouldn’t that be the env variable name being used in the example code and not
REPLIT_PG_DB_URL? This applies to the entire documentation.
- I’ve only tested this for Python, so not sure if it applies to the Node.js example code: when using
psycopg2, you need to use the
conn.commit() method to publish your changes to the db. This is not used in the example code. I can see a lot of users copying the code and forgetting .commit, resulting in no altercations to the db.
Overall, very impressed with the product! I love the query builder. Keep up the good work
Even though I’m disappointed with the new changes with the hacker plan, I don’t really think Postgres should be a hacker benefit. It’s not really something very necessary and replit shouldn’t have to lose more money on something like this, and normal hacker users shouldn’t have to pay for Postgres if they don’t want it. The current features I believe are good because most hacker users need them.
AFAIK Neon isn’t going to get rid of their free plan. I think they said that in their roadmap but true, seems like Replit’s version is more powerful.