Live data from Hacker News

Mastering PostgreSQL Administration [pdf]

momjian.us

21–30 of 56 posts

Re: Mastering PostgreSQL Administration [pdf]

#21
post #7

I debated running my own Postgres cluster for a side project, but ended up paying for Digitalocean’s managed offering. I’d like to hear from anyone running their own Postgres. Why did you choose to do that vs pay for a managed instance? How much of a hassle has it been? Is it something you really need significant Postgres experience to do well (to achieve security, backups, high availability, etc)? Biggest gotchas to…

Most managed offerings run on virtual machines where performance is 1/10th of what you'd get on a bare-metal machine rented for the same cost. As an example, I'm currently working on a project where we have an Azure managed Postgres DB for a staging environment. It costs ~50$/month and is an order of magnitude slower than my entry-level MacBook. That amount of money would give you fast NVME storage, 8 core dedicated…

Yeah, Azure managed Postgres DB is slow. Using on a producton server right now and thinking to move to a VM, but it qoul reqeuire a lot of DB admin that we are not capable of (human resources, basically).

My question: Is out there any other PostreSQL managed service faster than Azure and as simple to set up?

Re: Mastering PostgreSQL Administration [pdf]

#22
post #21
post #7

Earlier quoted context omitted.

Most managed offerings run on virtual machines where performance is 1/10th of what you'd get on a bare-metal machine rented for the same cost. As an example, I'm currently working on a project where we have an Azure managed Postgres DB for a staging environment. It costs ~50$/month and is an order of magnitude slower than my entry-level MacBook. That amount of money would give you fast NVME storage, 8 core dedicated…

Yeah, Azure managed Postgres DB is slow. Using on a producton server right now and thinking to move to a VM, but it qoul reqeuire a lot of DB admin that we are not capable of (human resources, basically). My question: Is out there any other PostreSQL managed service faster than Azure and as simple to set up?

This worries me because I assumed the lower tier that I'm using right now (it's a staging environment) for that project is slow because it's the lowest tier but performance would improve significantly once we upgrade to the production-grade tiers.

If that is not the case then I'm in trouble. I write and benchmark applications on my own laptop and always assume that if my low-end laptop is fast enough then whatever production-grade infrastructure we deploy it on will be on-par or faster. Seems like this assumption breaks down when it comes to Azure.

Re: Mastering PostgreSQL Administration [pdf]

#23
post #19

Earlier quoted context omitted.

First time I'm hearing about soyoustart. I've been under the assumption that Linode's instances are the cheapest ones, but the one you linked is Can you share your experience with using soyoustart?

SYS is basically OVH’s lower-end offering that still provides SLAs and better bandwidth (they have an even cheaper offering called Kimsufi but no SLA on those - though great value for staging/non-critical systems). The experience is mostly solid, though they don’t provide any kind of console access and I once got locked out after putting a machine to sleep from the command line (and had to open a ticket for someone t…

Thanks for sharing this!

Re: Mastering PostgreSQL Administration [pdf]

#25
post #21

Earlier quoted context omitted.

Yeah, Azure managed Postgres DB is slow. Using on a producton server right now and thinking to move to a VM, but it qoul reqeuire a lot of DB admin that we are not capable of (human resources, basically). My question: Is out there any other PostreSQL managed service faster than Azure and as simple to set up?

This worries me because I assumed the lower tier that I'm using right now (it's a staging environment) for that project is slow because it's the lowest tier but performance would improve significantly once we upgrade to the production-grade tiers. If that is not the case then I'm in trouble. I write and benchmark applications on my own laptop and always assume that if my low-end laptop is fast enough then whatever pr…

Sorry, I misworded. We are using it on "production", but our production is a closed beta for now, so we are using the Basic tier too.

We are thinking in upgrade it to a better plan, but we are not sure because we are not sure that it will solve our problems.

I think that comparing to your own laptop is unfair because there is no connectino needed, everything is on the same CPU / RAM, etc. Remember when you connect to a external DB informatin has to travel from one point to another.

Re: Mastering PostgreSQL Administration [pdf]

#26
You should have a look at https://github.com/citusdata/pg_auto_failover

This project makes is super easy to setup a resilient and highly-available postgresql cluster.

And since the postgresql client lib handle connection to multiple replica... no need for some kind of load-balancer (pg_bouncer, pgpool...) in front of it anymore (even if they can still be useful sometimes).

Re: Mastering PostgreSQL Administration [pdf]

#27

I debated running my own Postgres cluster for a side project, but ended up paying for Digitalocean’s managed offering. I’d like to hear from anyone running their own Postgres. Why did you choose to do that vs pay for a managed instance? How much of a hassle has it been? Is it something you really need significant Postgres experience to do well (to achieve security, backups, high availability, etc)? Biggest gotchas to…

Our product offers near real time (incremental sync every 3 mins) backup and restore solution for on-premise SQLServer data. We have used PostgreSQL to store the backup data in cloud and offered add-on services on top of PostgreSQL data (such as reports, analytics, etc). Every customer data is stored as a separate database. Initially we have used RDS as PostgreSQL instance when the product is in pilot phase. RDS cost…

Wow, thanks for your detailed comment. Learned a few things in here for our own EC2 deployment of PG.

Re: Mastering PostgreSQL Administration [pdf]

#28

I debated running my own Postgres cluster for a side project, but ended up paying for Digitalocean’s managed offering. I’d like to hear from anyone running their own Postgres. Why did you choose to do that vs pay for a managed instance? How much of a hassle has it been? Is it something you really need significant Postgres experience to do well (to achieve security, backups, high availability, etc)? Biggest gotchas to…

Our product offers near real time (incremental sync every 3 mins) backup and restore solution for on-premise SQLServer data. We have used PostgreSQL to store the backup data in cloud and offered add-on services on top of PostgreSQL data (such as reports, analytics, etc). Every customer data is stored as a separate database. Initially we have used RDS as PostgreSQL instance when the product is in pilot phase. RDS cost…

> we have reduced our cost by $1751.48 / month

It doesn't look like a huge win given how much complexity you added, while RDS manages it for you.

Re: Mastering PostgreSQL Administration [pdf]

#29
post #25

Earlier quoted context omitted.

This worries me because I assumed the lower tier that I'm using right now (it's a staging environment) for that project is slow because it's the lowest tier but performance would improve significantly once we upgrade to the production-grade tiers. If that is not the case then I'm in trouble. I write and benchmark applications on my own laptop and always assume that if my low-end laptop is fast enough then whatever pr…

Sorry, I misworded. We are using it on "production", but our production is a closed beta for now, so we are using the Basic tier too. We are thinking in upgrade it to a better plan, but we are not sure because we are not sure that it will solve our problems. I think that comparing to your own laptop is unfair because there is no connectino needed, everything is on the same CPU / RAM, etc. Remember when you connect to…

Hopefully the Standard (or whatever they call it) tier will solve both our problems. If IO performance is the bottleneck (you can see it on the Azure console - in my case that graph goes up to 100% with very light use) then hopefully the next tier will solve it.

> I think that comparing to your own laptop is unfair because there is no connectino needed, everything is on the same CPU / RAM, etc. Remember when you connect to a external DB informatin has to travel from one point to another.

Yes indeed, but in my case I was talking about DB query performance where the network plays a minimal part. If a query is near-instant on my laptop I expect it to be the same (or better) on production infra, but with Azure's Basic tier I noticed the opposite. I agree that if you're firing off lots of queries then network latency starts to add up, but in my case I haven't even reached that point - network latency is insignificant compared to the actual delays I'm seeing on the individual queries themselves.

Re: Mastering PostgreSQL Administration [pdf]

#30
post #24

I reconsidered mysql after switching jobs and seeing a multi-master clustered mysql database. Is anything similar available for postgresql?

Nothing in core, but there are products that have good online karma (at least I haven't read horror stories, the lack of which is always good news). See https://en.wikipedia.org/wiki/Multi-master_replication#Postg... for some examples.
Post reply on HN